Simple Java is a collection of frequently asked Java questions. You can download the PDF version here for free. If you like digrams and simple exmples in this book, you may also like Simple Java 8.
1. Strings and Arrays
- What is string immutability?
- How does substring() work?
- Why string is immutable?
- Create Java string Using ††or constructor?
- Is string passed by reference?
- length vs. length()
- How to check if an array contains a value efficiently?
- What is varargs?
- What exactly is null?
2. Common Methods
- Comparator vs. Comparable
- The contract between hashCode() and equals()
- Java passes object by reference or by value?
- Iteration vs. recursion
3. Classes and Interfaces
- Overloading vs. overriding
- What is instance initializer?
- Fields can not be overridden?
- Inheritance vs. composition
- How to use Java Enum?
- How many types of inner classes?
- What is inner interface?
- Constructors of sub and super classes?
- 4 access levels
- When to use private constructors?
4.1 Collections
- Class hierarchy of Collection and Map
- ArrayList vs. LinkedList vs. Vector
- HashSet vs. TreeSet vs. LinkedHashSet
- HashMap vs. TreeMap vs. HashTable vs. LinkedHashMap
- Sort Map By Value
- A TreeSet example
- Efficient counter
- Frequently used methods of HashMap
- Deep understanding of Arrays.sort(T[], Comparator < ? super T > c)
- How do developers sort?
- java.util.ConcurrentModificationException
4.2 Generics
- Why do we need generic types?
- Why do we need generic methods?
- What is type erasure?
- Set vs. Set<?>
- What’s the best way of converting Array to ArrayList?
5. Exceptions
- Java exception handling examples in open source projects
- Class hierarchy of exceptions
- How exception handling works?
- Can constructors throw exceptions?
6. Concurrency
- Monitors – the key idea of Java synchronization
- How to make a method thread-safe?
- join()
- notify() and wait()
- Create thread by overriding
7. I/O & Database
- Read file line by line
- Write file line by line
- FileOutputStream vs. FileWriter
- Should .close() be put in finally block or not?
- Java serialization
- How to use properties file?
8. Compiler and JVM
- JVM run-time data areas
- How does Java handle aliasing?
- What does an array look like in memory?
- What is memory leak?
- What can be learned from “Hello World”?
- Whan and how a class is loaded and initialized?
- Static type checking
- Generate code for overloaded and overridden methods?
9. Top collections
- Top 10 mistakes Java developers make
- Top 10 methods for Java arrays
- Top 10 questions of Java strings
- Top 10 questions for Java regular expression
- Top 10 questions about Java exceptions
- Top 10 questions about Java collections
- Top 9 questions about Java maps
- The most widely used Java libraries
- Top 10 websites for advanced level Java developers
- Top 10 books for advanced level Java developers
- Top 100 High-quality Java blogs
- Top 10 algorithms for coding interview
- Top 8 diagrams for understanding Java
- Top 100 Java Classes
10. Popular Libraries, Frameworks and Tools
- Reflection tutorial
- What is framework?
- Why do we need Java web frameworks like Struts 2?
- What is Servlet Container? What is Tomcat?
- What is aspect-oriented Programming?
- Library vs. framework?
- Spring
- Open source projects using Spring framework
- Design patterns in stories
- How CVS works?
- Why do we need software testing?
- Convert java jar file to exe
- Guava
- Log4j
- JSoup
- Swing
11. Java 8
12. Others
- Compile and Run Java in Command Line with External Jars
- How to build your own library?
- How to get double?
- Java and computer science courses
- Java vs. Python: Basic Syntax, Date Types
- How to write a crawler?
- 8 things programmers can do at weekends
- Declaration, initialization and scoping
- Date formatting(add more)
- Path of package and class
Hi,
I want to write articles for your web site (and get paid) as I am a Tech Lead with 10 years of experience in Java/JavaEE development. I used to write articles on Java, which can be viewed at http://www.orafaq.com/blog/saikat_goswami.
Regards,
Saikat Goswami