Home Article Practice java练习

java练习

2022-01-05 16:19  views:842  source:742049    

byte short int long float double char boolean
if (false){} else if (false){} else{}
for (int i = 1; i <= 10; i++) {}
int i=1;
while(i <= 10){}
int[] arr = {1,2,3,4,5};
int[] arr = new int[5];
for(int i = 0; i < arr.length; i++) {}
public static void
private protected interface package import
public static final
public abstract
java.lang.Math
Math.abs( )
Math.round( )
java.util.Random
java.lang.String
length( )
equals( )
charAt( )
indexOf( )
contains( )
trim( )
replace( )
substring(1, 3)
toUpperCase( )
split(";")
java.lang.StringBuffer
java.lang.StringBuilder
synchronized
java.util.Date
java.text.SimpleDateFormat
String t = "2021/12/20";
SimpleDateFormat sd = new SimpleDateFormat("yyyy/MM/dd");
Date e = sd.parse(t);
Date d = new Date();
SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd ");
String str = s.format(d);
java.lang.Integer
java.lang.Character
int a = 2;
String b = String.valueOf(a);
String c = "3";
int d = Integer.parseInt(c);
java.io.InputStream
java.io.OutputStream
java.io.Reader
java.io.Writer
FileReader f = new FileReader("d:/person.txt");
BufferedReader b = new BufferedReader(f);
FileWriter f = new FileWriter("d:/person2.txt", true);
BufferedWriter b = new BufferedWriter(f);
Throwable
Error
Exception
RuntimeException
Component
Repository
Service
Controller
Autowired
Resource
Controller
RequestMapping
ResponseBody
RestController
RequestParam
param
insert update delete select collection association resultMap result id
namespace id parameterType resultType resultMap id type property
column javaType ofType



Disclaimer: The above articles are added by users themselves and are only for typing and communication purposes. They do not represent the views of this website, and this website does not assume any legal responsibility. This statement is hereby made! If there is any infringement of your rights, please contact us promptly to delete it.

字符:    改为:
去打字就可以设置个性皮肤啦!(O ^ ~ ^ O)