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

Java Interview Cheat Sheet

This document is a Java interview cheat sheet covering essential concepts such as OOP principles, data types, operators, control statements, and exception handling. It also discusses advanced topics like inheritance, polymorphism, encapsulation, abstraction, collections framework, multithreading, file handling, and features introduced in Java 8. The cheat sheet serves as a quick reference for key Java programming concepts and practices.

Uploaded by

juhi79865
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)
20 views2 pages

Java Interview Cheat Sheet

This document is a Java interview cheat sheet covering essential concepts such as OOP principles, data types, operators, control statements, and exception handling. It also discusses advanced topics like inheritance, polymorphism, encapsulation, abstraction, collections framework, multithreading, file handling, and features introduced in Java 8. The cheat sheet serves as a quick reference for key Java programming concepts and practices.

Uploaded by

juhi79865
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
You are on page 1/ 2

Java Interview Cheat Sheet (Simple & Easy Language)

1. Basics of Java

Java is a programming language that is simple, secure, object-oriented and platform-independent


(can run anywhere).

2. OOP Concepts

4 main ideas:
- Class & Object
- Inheritance
- Encapsulation
- Polymorphism
- Abstraction

3. Data Types & Variables

Different data types like int, float, char, boolean. Variables hold data values.

4. Operators

Arithmetic (+, -, *), Relational (==, !=), Logical (&&, ||), Assignment (=, +=).

5. Control Statements

if-else, switch, for, while, do-while loops to control flow of programs.

6. Arrays

Collection of similar data types. Example: int[] numbers = {1, 2, 3};

7. String Handling

Strings are text. Use methods like length(), charAt(), toUpperCase().

8. Exception Handling

Errors are managed using try-catch blocks to prevent program crash.


9. Inheritance

Child class inherits features from Parent class. Example: Bike extends Vehicle.

10. Polymorphism

One thing, many forms: Method Overloading & Method Overriding.

11. Encapsulation

Hide data using private variables and use getter & setter methods.

12. Abstraction

Show only necessary details, hide the rest. Done using abstract classes & interfaces.

13. Interfaces & Abstract Classes

Interface: all methods are abstract. Abstract Class: can have both abstract & normal methods.

14. Collections Framework

List (ordered), Set (no duplicates), Map (key-value). Examples: ArrayList, HashSet, HashMap.

15. Multithreading

Run multiple tasks at once. Example: two cooks in one kitchen.

16. File Handling

Read & write files using File, FileReader, FileWriter classes.

17. Java 8 Features

Lambda Expressions, Streams, Functional Interfaces, Method References.

You might also like