Java runs on JVM → bytecode → machine code → so it works on any OS.
JDK → development kit
JRE → runtime environment
JVM → executes bytecode
Encapsulation
Inheritance
Polymorphism
Abstraction
Overloading – compile time, same method name, different params. Overriding – runtime, same signature in subclass.
Refers to current object.
Refers to parent class.
Default
Parameterized Used to initialize objects.
Abstract → can have concrete + abstract methods
Interface → only abstract methods (Java 8 allows default/static)
Area in heap memory that stores unique string literals.
String → immutable
StringBuilder → mutable, not thread-safe
StringBuffer → mutable, thread-safe
try, catch, finally, throw, throws
Checked → compile time (IOException)
Unchecked → runtime (ArithmeticException)
Collections grow dynamically, array has fixed length.
List → ordered, duplicates allowed
Set → unique, no duplicates
Map → key-value pairs
HashMap → not synchronized, faster
Hashtable → synchronized, slower
Extend Thread OR implement Runnable.
The following metrics were computed from 3 interview experiences for the Infosys Java Engineer role in Pune, India.
Infosys's interview process for their Java Engineer roles in Pune, India is fairly selective, failing a large portion of engineers who go through it.
Candidates reported having very good feelings for Infosys's Java Engineer interview process in Pune, India.