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

Java_Important_Questions

nothing

Uploaded by

Madhu bala
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)
5 views2 pages

Java_Important_Questions

nothing

Uploaded by

Madhu bala
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 Important Questions

1. Java Basics
- Data Types & Variables: int, float, double, char, boolean, String
- Operators: Arithmetic (+, -, *, /, %), Relational (==, !=, >, <, >=, <=), Logical (&&, ||, !)
- Conditional Statements
Example:
int num = 10;
if (num > 0) {
System.out.println("Positive");
} else {
System.out.println("Non-positive");
}
- Loops: for, while, do-while
Example:
for (int i=1; i<=5; i++) {
System.out.println(i);
}
- Scanner Input
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();

2. OOP Concepts
- Class & Object
- Inheritance
- Polymorphism (Method Overloading & Overriding)
- Abstraction (Abstract Class & Interface)
- Encapsulation (Private variables with getters/setters)

3. Advanced Topics
- Exception Handling
- File Handling
- Collections (ArrayList, LinkedList, HashMap, HashSet)
- Multithreading
- Java 8 Features: Lambda, Streams

4. Important Coding Questions


- Odd/Even Number
- Largest of 3 Numbers
- Array Operations: Sum, Average, Reverse, Max/Min
- String Manipulation: Reverse string, Palindrome, Count vowels
- Patterns: Pyramid, Inverted Pyramid, Right Triangle
- Logical Programs: Prime number, Factorial, Fibonacci, Armstrong number

You might also like