0% found this document useful (0 votes)
16 views2 pages

Java Interview 1 Page Notes

This document provides quick notes for a Java interview covering key concepts such as platform independence, OOP principles, static methods, access modifiers, constructors, and the differences between various classes and interfaces. It also highlights distinctions between String types, collections like HashMap and Hashtable, threading, SQL commands, and the differences between Spring and Spring Boot. The notes serve as a concise reference for essential Java topics and concepts relevant to interviews.

Uploaded by

Nithin Sai
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Java Interview 1 Page Notes

This document provides quick notes for a Java interview covering key concepts such as platform independence, OOP principles, static methods, access modifiers, constructors, and the differences between various classes and interfaces. It also highlights distinctions between String types, collections like HashMap and Hashtable, threading, SQL commands, and the differences between Spring and Spring Boot. The notes serve as a concise reference for essential Java topics and concepts relevant to interviews.

Uploaded by

Nithin Sai
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JAVA INTERVIEW – 1 PAGE QUICK NOTES

Java Platform Independent: Java compiles into bytecode which runs on JVM on any OS.

OOP Concepts:
• Inheritance – One class acquires another class properties
• Encapsulation – Binding data & methods together
• Abstraction – Hiding implementation details
• Polymorphism – One method, many forms (Overloading & Overriding)

Static Methods:
• Can be overloaded
• Cannot be overridden (compile-time binding)

Access Modifiers: Default, Private, Protected, Public

Constructors:
• Default – No arguments
• Parameterized – With arguments

Singleton Class: Only one object created using private constructor

== vs equals():
• == compares reference
• equals() compares values

Interface vs Abstract Class:


• Interface supports multiple inheritance
• Abstract class supports partial implementation

String vs StringBuffer vs StringBuilder:


• String – Immutable, slow
• StringBuffer – Mutable, thread-safe
• StringBuilder – Mutable, fastest

Variables:
• Local – Inside method/block
• Instance – Inside class, outside method

final / finally / finalize:


• final – restriction
• finally – always executes
• finalize – before garbage collection

HashMap vs Hashtable:
• HashMap – Not synchronized, faster
• Hashtable – Synchronized, slower

Threads:
• Extend Thread class
• Implement Runnable interface

SQL:
• DDL, DML, DCL, TCL
• GETDATE() – current date
• WHERE filters rows, HAVING filters groups
Spring vs Spring Boot:
• Spring – Manual configuration
• Spring Boot – Auto configuration, production ready

You might also like