Comparable : (interface)
.compareTo(Object obj) : returns -1 if caller < obj, 0 =, 1 >
- Object
.getClass():
.hashCode():
.toString(): class to string
new SomeException() : returns error
new SomeException(String s) : returns error with string s
.asList(array) : array to list (collection)
.length :
.parseDouble(string) : converts from string to double
int .compareTo(Integer) : compare values
.parseInt(string) : converts from string to int
.valueOf(int) :
.length() :
.substring() :
.toLowerCase() :
.toUpperCase() :
BufferedReader :
InputStreamReader isr = new InputStreamReader(System.in) :
BufferedReader br = new BufferedReader(isr) :
String br.readLine() :
// import java.util.Scanner;
// Scanner s = new Scanner(System.in);
s.next() : return input string
s.nextByte() :
s.nextDouble() :
s.nextFloat() :
s.nextInt() :
s.nextLong() :
.currentTimeMillis() : current time (ms)
//std output
System.out.println(string / object) : prints argument and line separator
- if object: calls objectType.toString()
System.currentTimeMillis() :
// import java.util.Calendar;
int DAY_OF_MONTH : value for get/set
int MONTH : value for get/set
int YEAR : value for get/set
int get(int field) :
// import java.util.Date;
// import java.util.GregorianCalendar;
//extends Calendar
GregorianCalendar(int year, int month, int dayOfMonth) : constructor
// import java.time.Year;
int .getValue() : year to int
- //es.: int y = Year.now().getValue()
static Year Year.now() : current year
Year Year.of(int ) : year from int to Year
// Math
// import java.lang.Math;
max(int a, int b) :
min(int a, int b) :