- Basic Programs
- Numbers
- Array Based Programs
- String Based Programs
- Converters
- Sorting
- Searching
- Matrix
- Print The Series
- Pattern Questions
- Brackets or Parentheses Problems
- Check the given number is EVEN or ODD. [Solution]
- Write a Java Program to find the Factorial of given number. [Solution]
- Find the Factorial of a number using Recursion. [Solution]
- Swap two numbers without using third variable approach 1. [Solution]
- Swap two numbers without using third variable approach 2. [Solution]
- Swap two numbers without using third variable approach 3. [Solution]
- How to check the given number is positive or negative in Java? [Solution]
- Write a Java Program to find whether given number is Leap year or NOT? [Solution]
- Write a Java Program to Print 1 To 10 Without Using Loop. [Solution]
- Write a Java Program to print the digits of a Given Number. [Solution]
- Write a Java Program to print all the Factors of the Given number. [Solution]
- Write a Java Program to find sum of the digits of a given number. [Solution]
- Write a Java Program to find smallest in 3 nummbers (a,b,c) without using < or > symbol?
- How to add two numbers without using the plus operator in Java?
- Write a java program to Reverse a given number. [Solution]
- Write a Java Program to find GCD of two given numbers. [Solution]
- Write a java program to LCM of TWO given number. [Solution]
- Write a java program to LCM of TWO given number using Prime Factors method. [Solution]
- Check whether the Given Number is a Palindrome or NOT.
- Write a Java Program to print all the Prime Factors of the Given Number. [Solution]
- Write a Java Program to print the Fibonacci Series upto N number.
- Write a Java Program to check whether the Given Number is Prime Number or NOT.
- Write a Java Program to print Prime Numbers from 1 to N.
- Write a Java Program to check whether the given number is Armstrong Number or NOT. [Solution]
- Write a Java Program to print Armstrong Numbers between 1 to 1000. [Solution]
- Write a Java Program to check whether the given number is Perfect Number or NOT. [Solution]
- Write a Java Program to print Perfect Numbers between 1 to 1000. [Solution]
- Write a Java Program to check whether the given numbers are Amicable Numbers or NOT.
- Write a Java Program to print Amicable Numbers between 1 to 1000.
- Write a Java Program to check whether the given number is Ramanujam's Number or NOT. [Solution]
- Write a Java Program check whether the given number is Automorphic Number or NOT. [Solution]
- Write a Java Program to print Automorphic Number between 1 to 1000. [Solution]
- Write a Java Program check whether the given number is Smith Number or NOT. [Solution]
- Write a Java Program to print Smith Number between 2 to 1000. [Solution]
- Write a Java Program to check whether given number is Kaprekar Number or NOT.
- Write a Java Program to print Kaprekar Numbers between 1 to 1000.
- Write a Java Program to subtract two binary numbers?
- How to check if two rectangles overlap with each other?
- Calculate the average of given array. [Solution]
- Find the second largest number in the given array. [Solution]
- Find the second minimum number in the given array. [Solution]
- Find the missing Number in the given array of 1 to N.
- Write a Java Program to find the Intersection of two arrays. [Solution]
- Write a Java Program to find the Intersection of Two Sorted arrays. [Solution]
- Write a Java Program to find the Union of Two Arrays (UnSorted Array). [Solution]
- Write a Java Program to find the Union of Two Arrays (Sorted Arrays). [Solution]
- Write a Java Program to find the Union of Tow Arrays using HashSet. [Solution]
- Write a Java Program to Move all Zero to End of the Array. [Solution]
- Write a Java Program to Move all Zeros to Start of the Array. [Solution]
- Write a Java Program to remove the given element from the Array.
- Write a Java Program to reverse the given array without using additional Array. [Solution]
- Write a program to find the Most Frequent Element in an given array.
- Write a program to find out Duplicate Element in an given array.
- Find the pair of elements(X+Y) in the array whoose sum is equal to given number Z.
- Write a java program to check Given String is Palindrome or NOT. [Solution]
- How to Swap two Strings without using third (temporary) variable? [Solution]
- Write a java program to reverse a String without using in-build function. [Solution]
- Write a java program to count the number of words in a given String. [Solution]
- Write a java program to remove all White Spaces in the given String.
- Check Given String is Rotation of Another String. [Solution]
- Write a Java Program to check two strings are Anagram to each other or NOT. [Solution]
- Write a Java program to find the Most Repeated Character in the Given String. [Solution]
- How do you count the number of words in a Given String using Split method? [Solution]
- Write a Java Program to generate all combinatinos of a Given String. [Solution]
- Write a Java Program to print all permutatinos of a Given String. [Solution]
- Write a Java Program to find All Subsets of a Given String using Bitwise approach. [Solution]
- Write a Java Program to find All Subsets of a Given String using Recursion approach. [Solution]
- Convert Decimal Number to Binary Number. [Solution]
- Convert Binary Number to Decimal Number. [Solution]
- Convert Decimal Number to Octal Number. [Solution]
- Convert Octal Number to Decimal Number.
- Convert Hexadecimal to Octal.
- Convert Octal to HexaDecimal.
- Convert Octal to Binary Number. [Solution]
- Convert Binary Number to Octal. [Solution]
- Bubble Sort [Solution]
- Quick Sort [Solution]
- Selection Sort [Solution]
- Insertion Sort [Solution]
- Merge Sort [Solution]
- Linear Search [Solution]
- Binary Search [Solution]
- Write a Program to Transpose a Matrix. [Solution]
- Write a Program to add or Subtract Two Matrices. [Solution]
- Write a Program to Multiply Two Matrices in Java?
- Write a Java Program to print the Matrix Spiral form.
- Write a Java Program to find Matrix Determinent.
- Write the Java Program to print the following series (EVEN number series) [Solution]
2 4 6 8 10 12 14 16 .....
- Write the Java Program to print the following series (ODD number series) [Solution]
1 3 5 7 9 11 13 ....
- Write the Java Program to print the following series (Pattern Series) [Solution]
3, 33, 333, 3333, 33333, 333333 ....
- Write the Java Program to print the following series [Solution]
10 1 9 2 8 3 7 4 6 5 5 6 4 7 3 8 2 9 1 10
- Write the Java Program to print the following series
1 2 4 7 11 16 22 29 .....
- Write the Java Program to print the following series
1 2 3 2 3 4 3 4 5 4 5 4 5 6 5 6 5 6 7 ....
- Write the Java Program to print the following series
1 2 9 28 65 126 217 344
- Write the Java Program to print the following series (Geometric progression)
2 4 8 16 32 64 128 256 512 1024 ......
- Write the Java Program to print the following series (Arithmetic progression)
0 5 10 15 20 25 30 35 ....
- Write the Java Program to print the following series (Fibonacci Series)
1 1 2 3 5 8 13 21 34 55 89 .....
- Write the Java Program to print the following series (Prime Number Series)
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 .....
- Write the Java Program to print the following series (Triangular Number Series)
1 3 6 10 15 21 28 36 45 55 .....
- Write a Program to print Floyd's triangle? [Solution]
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
16 17 18 19 20 21
- Write a Program to print Pascal's triangle?
- Write a Java Program to print the following Pattern [Solution]
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4 5 6
- Write a Java Program to print the following Pattern. [Solution]
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
6 6 6 6 6 6
- Write a Java Program to print the following Pattern. [Solution]
6 5 4 3 2 1
6 5 4 3 2
6 5 4 3
6 5 4
6 5
6
- Write a Java Program to print the following Pattern. [Solution]
1 2 3 4 5 6
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
- Write a Java Program to print the following Pattern. [Solution]
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1
1 2 3 4 5 6 5 4 3 2 1
- Write a Java Program to print the following Pattern. [Solution]
1 2 3 4 5 6
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4 5 6
- Write a Java Program to print the following Pattern. [Solution]
1 2 3 4 5 6
2 3 4 5 6
3 4 5 6
4 5 6
5 6
6
5 6
4 5 6
3 4 5 6
2 3 4 5 6
1 2 3 4 5 6
- Write a Java Program to print the following Pattern. [Solution]
1
2 1
3 2 1
4 3 2 1
5 4 3 2 1
6 5 4 3 2 1
- Write a Java Program to print the following Pattern. [Solution]
1
1 0
1 0 1
1 0 1 0
1 0 1 0 1
1 0 1 0 1 0
- Write a Java Program to print the following Pattern.
1 1 1 1 1 1
1 1 1 1 2 2
1 1 1 3 3 3
1 1 4 4 4 4
1 5 5 5 5 5
6 6 6 6 6 6
- Write a Java Program to print the following Pattern.
9 9 9 9 9 9 9 9 9
7 7 7 7 7 7 7
5 5 5 5 5
3 3 3
1
- Write a Java Program to find out whether the given string is Balanced Parentheses or NOT? [Solution]
()() - VALID
(()) - VALID
())( - INVALID
(( - INVALID
- Generate Balanced Parentheses of N pairs. [Solution]
N = 2 N= 3
()() ()()()
(()) (())()
()(())
(()())
((()))
- Generate All possible combinations of Parentheses.
N = 2 N= 3
() ()
()() ()()
(()) (())
()()()
(())()
()(())
(()())
((()))
- Count the Number of possible combinations of Parentheses.
N = 2 N= 3
() ()
()() ()()
(()) (())
Output = 3 ()()()
(())()
()(())
(()())
((()))
Output = 8
- What do you know about JVM, JRE and JDK?
- Is JRE platform dependant or independent?
- Which is ultimate base class in java class hierarchy? List the name of methods of it?
- Which are the reference types in java?
- What is narrowing and widening?
- How will you print "Hello CDAC" statement on screen, without semicolon?
- Can you write java application without main function? If yes, how?
- What will happen, if we call main method in static block?
- In System.out.println, What is meaning of every word?
- How will you pass object to the function by reference?
- What is constructor chaining? How can we achieve it in C++?
- Which are the rules to overload method in sub class?
- What is the difference between finalize and dispose?
- What is shut down hook?
- What is the difference between final, finally and finalize?
- What is the difference between checked and unchecked exception?
- What is exception chaining?
- What is the difference between throw and throws?
- In which case, finally block doesn’t execute?
- What is upcasting?
- What is dynamic method dispatch?
- What do you know about final method?
- What is the difference between abstract class and interface?
- What is fragile base class problem and how can we overcome it?
- Why java does not support multiple implementation inheritance?
- What is marker interface? List the name of some marker interfaces?
- What is the significance of marker interface?
- What is the difference between Comparable and Comparator?
- What is the difference between Array and ArrayList?
- What is the difference between HashSet and HashMap?
- What is the difference between HashTable and HashMap?
- Which collection classes are synchronized?
- What is the difference between ArrayList and Vector?
- What is the difference between Enumeration and Iterator?
- What is the difference between Iterator and ListIterator?
- What is the difference between fail-fast and fail-safe iterator?
- How can you copy elements of one collection into another without iterator?
- What is the difference between String and StringBuffer?
- What is the difference between StringBuffer and StringBuilder?
- How can you check wheather string is palindrome or not?
- Can we write multiple public classes in single .java file? If no why?
- What is serialization and deserialization?
- If serializable class do not contain serializable fields, what will happen? If its problematic then how will overcome it?
- Which two techniques allow us to create new instance from existing one?
- Which members do not serialize?
- What is metadata? What is advantage of it?
- What is bytecode?
- What is reflection?
- Which features of java makes it platform dependant?
- What is applet?
- Can you explain life cycle of applet?
- Why AWT components are heavy weight component?
- What is thread?
- Which are the types of thread? What is the difference between them?
- Explain life cycle of thread?
- What is race condition? How can we overcome it?
- What is synchronization? How can we achieve it?
- How can we share object between the threads?
- Why wait, notify and notifyall methods belongs to Object class instead of Thread class?
- What do you know about volatile keyword in java?
- What is the difference between Thread. Sleep and Thread.yield?
- What is deadlock? How can we avoid it?
- Why thread based multitasking is faster than process based multitasking?
- When we should use Thread class and Runnable interface to create thread?
- What is wild card? Which are the types of it?
- What is the difference between TCP and UDP protocol?
- What is socket?
- When we should use socket and rmi?
- How will you write code for linkedlist in java?
- What is wrapper class? What is need of it?
- What are the various access specifiers for Java classes?
- What's the purpose of Static methods and static variables?
- What is data encapsulation and what's its significance?
- What is a singleton class? Give a practical example of its usage.
- What are Loops in Java? What are three types of loops?