codingknowledge_
harish Swipe
Java
CheatSheet
codingknowledge_
harish
Data Types String Methods
Primitive .length()
int, float, double, char, .charAt()
boolean, byte, short, .substring()
long .equals()
.equalsIgnoreCase()
Non-Primitive
.toUpperCase()
String, Array, Class
.toLowerCase()
.trim()
Operators .replace()
Arithmetic : +, -, *, /, % .split()
Relational :==, !=, >, <,
>=, <=
Array Methods
Logical : &&, ||, ! int[] array = new
Bitwise : &, |, ^, ~, <<, >> int[size]
Assignment :=, +=, -=, *=, [Link]
/=, %=
Unary : ++, --
Comment “java” to get this Cheatsheet PDF
codingknowledge_
harish
ArrayList Methods Date & Time
.add() LocalDate
.remove() LocalTime
.get() LocalDateTime
.set() DateTimeFormatter
.size() .now() .parse()
.clear() .format()
.contains()
.isEmpty()
HashMap Methods
.put()
.get()
.remove()
.containsKey()
.containsValue()
.keySet()
.values()
.size()
codingknowledge_
harish
File Handling Exception Handling
File try, catch, finally
FileReader throw
FileWriter throws
BufferedReader Exception
BufferedWriter IOException
.read() NullPointerException
.write() ArithmeticException
.close()
.exists()
.delete()
OOP Basics
class extends
public, private, implements
protected interface
static abstract
void super
this final
codingknowledge_
harish
Built-in Methods Java Collections
Framework
[Link](),[Link]()
[Link]() List
[Link]() ArrayList
[Link]() LinkedList
[Link]() Set
[Link]() HashSet
[Link](),[Link]() LinkedHashSet
TreeSet
Threads Map
HashMap
Thread LinkedHashMap
Runnable TreeMap
.start()
.run() Annotations
.sleep()
@Override
.join()
@Deprecated
.interrupt()
@SuppressWarnings
codingknowledge_
harish
Java Keywords Streams
public, protected, .stream()
private .filter()
class, interface, enum .map()
static, final .collect()
void, return .forEach()
extends, implements .reduce()
this, super
new, import, package
break, continue
Comment “java” to get this Cheatsheet PDF