摘要:
package com.shujia.day12; /* Character:是基本数据类型char的包装类 成员方法: public static boolean isUpperCase(char ch) 判断是否为大写 public static boolean isLowerCase(char 阅读全文
posted @ 2024-08-09 20:15
ていせい
阅读(19)
评论(0)
推荐(0)
摘要:
package com.shujia.day12; /* Integer的成员方法: public int intValue() 将包装的基本数据类型值取出来 public static int parseInt(String s) String -> int public static Strin 阅读全文
posted @ 2024-08-09 20:13
ていせい
阅读(14)
评论(0)
推荐(0)
摘要:
package com.shujia.day12; /* 包装类: 为了让基本数据类型的变量像引用数据类型那样可以调用方法,处理对应值,java针对每一种基本数据类型都提供了对应的引用数据类型 这些引用数据类型统称为包装类。 byte -- Byte short -- Short int -- In 阅读全文
posted @ 2024-08-09 20:05
ていせい
阅读(15)
评论(0)
推荐(0)
摘要:
package com.shujia.day12; import java.util.Arrays; /* Arrays: 是java提供专门针对数组做操作的工具类,该类没有构造方法,且方法都是静态的 成员方法: public static String toString(int[] a) 将任意一 阅读全文
posted @ 2024-08-09 19:52
ていせい
阅读(15)
评论(0)
推荐(0)
摘要:
package com.shujia.day11; public class string { public static void main(String[] args) { String s1 = "hello"; String s2 = "world"; System.out.println( 阅读全文
posted @ 2024-08-08 22:41
ていせい
阅读(13)
评论(0)
推荐(0)
摘要:
package com.shujia.day11; public class stringBufferDemo1 { public static void main(String[] args) { String s1 = "hello"; //StringBuffer作为参数传递 StringBu 阅读全文
posted @ 2024-08-08 22:29
ていせい
阅读(12)
评论(0)
推荐(0)
摘要:
package com.shujia.day11; import java.util.Scanner; /* 把字符串反转 */ public class StringBufferDemo6 { public static void main(String[] args) { Scanner sc 阅读全文
posted @ 2024-08-08 22:08
ていせい
阅读(22)
评论(0)
推荐(0)
摘要:
package com.shujia.day11; /* 把数组拼接成一个字符串 */ public class StringBufferDemo5 { public static void main(String[] args) { int[] arr = {11, 22, 33}; String 阅读全文
posted @ 2024-08-08 22:07
ていせい
阅读(16)
评论(0)
推荐(0)
摘要:
package com.shujia.day11; /* String和StringBuffer的相互转换 A -> B B -> A */ public class StringBufferDemo4 { public static void main(String[] args) { // St 阅读全文
posted @ 2024-08-08 21:40
ていせい
阅读(24)
评论(0)
推荐(0)
摘要:
package com.shujia.day11; /* StringBuffer的功能: 添加功能 public StringBuffer append(String str) 在末尾处添加字符,返回自身 public StringBuffer insert(int offset,String s 阅读全文
posted @ 2024-08-08 21:29
ていせい
阅读(35)
评论(0)
推荐(0)
浙公网安备 33010602011771号