摘要: package com_black.daobao.A1; public class Teacher { public void teach(){ System.out.println("good study,day day up"); } } package com_black.daobao.A2; 阅读全文
posted @ 2023-09-11 23:22 奈格里- 阅读(14) 评论(0) 推荐(0)
摘要: package com_black.jicheng; //手机类 public class phone { public void call(String name){ System.out.println("给"+name+"打电话"); } } package com_black.jicheng 阅读全文
posted @ 2023-09-10 23:20 奈格里- 阅读(12) 评论(0) 推荐(0)
摘要: package com_black.jicheng; //调试类 public class Demo { public static void main(String[] args) { //创建对象调用方法 fu c=new fu(); c.show(); zi z=new zi(); z.met 阅读全文
posted @ 2023-09-08 23:41 奈格里- 阅读(13) 评论(0) 推荐(0)
摘要: import java.util.ArrayList; /* public boolean remove(Object) 删除指定的元素,返回删除是否成功 public E remove(int index) 删除指定索引处的元素,返回被删除的元素 public E set(int index.E 阅读全文
posted @ 2023-09-05 23:11 奈格里- 阅读(9) 评论(0) 推荐(0)
摘要: import java.util.ArrayList; public class Demo01 { public static void main(String[] args) { //public ArrayList()创建一个空的集合对象 //ArrayList<String> a =new A 阅读全文
posted @ 2023-09-03 23:41 奈格里- 阅读(7) 评论(0) 推荐(0)
摘要: /* StringBuilder转化为String public String toString();通过toString()就可以实现 String转化为StringBulider public StringBuilder(String);通过构造方法实现 */ public class Stri 阅读全文
posted @ 2023-09-03 00:31 奈格里- 阅读(145) 评论(0) 推荐(0)
摘要: import java.util.Scanner; //已知用户名和密码,请用程序实现模拟用户登录,总共三次机会,登录之后,给出相应的提示 public class Test2 { public static void main(String[] args) { //已知用户名和密码,定义字符串表示 阅读全文
posted @ 2023-08-30 00:17 奈格里- 阅读(22) 评论(0) 推荐(0)
摘要: public class StringDemo02 { //使用==比较,基本类型:比较的数据值是否相同;引用类型:比较的是地址值是否相同 //字符串是对象,他比较内容是否相同,通过equals()实现 public static void main(String[] args) { //构造方法的 阅读全文
posted @ 2023-08-30 00:16 奈格里- 阅读(21) 评论(0) 推荐(0)
摘要: public class Student02 { private String name; private int age; public void setName(String n){ name = n; } public String getName(){ return name; } publ 阅读全文
posted @ 2023-08-17 22:05 奈格里- 阅读(6) 评论(0) 推荐(0)
摘要: package com_black; //题目:逢七过(1-100) public class Test1 { public static void main(String[] args) { for (int i=1;i<=100;i++){ if(i%10==7|| i/10%10==7|| i 阅读全文
posted @ 2023-08-15 21:43 奈格里- 阅读(24) 评论(0) 推荐(0)