java常见的接口_java里面常见的接口与方法

1 .java.lang.Double

static double

Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.

static int

Compares the two specified double values.

2. java.lang.Character

public static boolean isLowerCase(char ch)

public static boolean isUpperCase(char ch)

public static boolean isDigit(char ch)

public static char toLowerCase(char ch)

public static char toUpperCase(char ch)

public static boolean isSpaceChar(char ch)

public static boolean isWhitespace(char ch)

3.  java.lang.Long

public static long parseLong(String s) throws NumberFormatException

public static long parseLong(String s,int radix) throws NumberFormatException

Long.parseLong("+42", 10) returns 42L

Long.parseLong("-FF", 16) returns -255L

Long.parseLong("1100110", 2) returns 102L

Long.parseLong("99", 8) throws a NumberFormatException

4.java.lang.Boolean

public static int compare(boolean x,boolean y)

Boolean.valueOf(x).compareTo(Boolean.valueOf(y))

public static boolean parseBoolean(String s)

5. java.lang.Math

public static double abs(double a)

public static int max(int a, int b)

public static float min(float a,float b)

6.java.lang.String

String by decoding the specified array of bytes using the platform's default charset.

Charset charset)  Constructs a new String by decoding the specified array of bytes using the specified charset.

public int length()

public boolean isEmpty()   Returns true if, and only if, length() is 0.

public char charAt(int index)

public byte[] getBytes(Charset charset)

public boolean contentEquals(CharSequence cs)

public boolean equalsIgnoreCase(String anotherString)

public int compareTo(String anotherString)

public int compareToIgnoreCase(String str)

public boolean startsWith(String prefix)

public boolean endsWith(String suffix)

public int indexOf(int ch)

public int indexOf(String str)

public String toLowerCase()

public String toUpperCase()

public boolean contains(CharSequence s)

public CharSequence subSequence(int beginIndex,int endIndex)

public String substring(int beginIndex,int endIndex)

public static String format(String format,Object... args)

public char[] toCharArray()

7. java.lang.StringBuilder

public StringBuilder append(char[] str)

public String toString()

public char charAt(int index)

public String substring(int start)

public int indexOf(String str)

java.lang.StringBuilder,java.lang.StringBuffer,java.lang.String 都实现了CharSequence接口

10.A thread-safe, mutable sequence of characters. A string buffer is like a String, but can be modified.

11.A mutable sequence of characters. This class provides an API compatible with StringBuffer, but with no guarantee of synchronization.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值