- 博客(4)
- 收藏
- 关注
原创 JAVA从基础到精通(包装类)
Byte(byte value) byte mybyte=45; Byte b=new Byte(mybyte); Byte(String str) Byte mybyte=new Byte("12"); character(char value) Character mychar=new Character('s');
2017-06-07 22:38:56
140
原创 JAVA从基础到精通(面向对象)
类 成员变量 public class Book { private String name; public String getName(){ int id=0; setName("Java"); return id+this.name; } private void setName(String name){ this.name=name; } public Book
2017-06-06 20:46:50
171
原创 JAVA从基础到精通(数组)
package HelloWorld; public class Matrix { public static void main(String[] args) { int a[][]=new int[3][4]; for(int i=0;i for(int j=0;j System.out.print(a[i][j]); } System.out.println(); }
2017-06-05 20:16:49
209
原创 JAVA从基础到精通(字符串)
查找字符串位置 str.length(); String str=”We are students”; int size=str.length(); //获取字符串长度 String str=”We are students”; int size=str.indexOf(“a”); str.indexOf(substr) //查找字符串首次出现的位置
2017-06-04 17:14:40
254
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人