Start Now!
Enroll to Get StartedWith this course, you will:
- Practice 100 interview questions
- Practice with coding exerises
- Earn a professional certificate
Average Salary (US)
$96,864
Prerequisites
Average Salary (US)
$96,864
Prerequisites
Start Now!
Enroll to Get StartedCourse
Java Interview Questions
Ace your coding interview with this comprehensive and curated course of the most important Java interview questions.
Course Content
Chapter 1:
Introduction
Chapter 2:
Basics
2.1Find the Smallest Element in an Array2.2Check Whether a Number is Prime or Not2.3Number of Vowels in a String2.4Length of the String2.5Reverse a Given String2.6Second Largest Element in an Array2.7Find Factorial of a Number2.8Remove Spaces From a String2.9Swap two numbers Without Using the Third Variable2.10Count Number of Digits in a Number2.11Find Nth Fibonacci Number2.12Toggle the Case of Every Character in the String2.13Calculate the Number of Times a Digit Appears in a Number2.14Separate 0's and 1's from an Array2.15Separate Even and Odd Numbers in an Array2.16Count the Number of Capital Letters in a String2.17Sum of Largest and Smallest Element in an Array2.18Find x Power n Using Recursion2.19Reverse an Array Without Using the reverse() Method2.20Check Whether a String is Palindrome or Not2.21Check Two Strings are Anagrams or not2.22Find the Index of the First and the Last Occurrence of an Element
Chapter 3:
Intermediate
Chapter 4:
Advanced
4.1Find Leaders in an Array4.2Check If A Given String Is A Palindrome4.3Count the Number of Words in a String Using HashMap4.4Check Whether a String is a Valid Email Address4.5Permutation of a String4.6Find Longest Palindromic Substring in a Given String4.7Combinations of List Elements Whose Sum Equals the Target Value
Chapter 5:
Theory Questions
5.1Java Virtual Machine(JVM)5.2Types of Memory Area Allocated by JVM5.3JIT Compiler5.4Exceptions in Java5.5Static and Non-Static Method5.6Final Variable, Method and Class5.7No Pointers in Java5.8Overloading the main() Method5.9JVM, JRE, JDK5.10Wrapper Class5.11Making a Constructor final5.12Difference Between an Interface and an Abstract Class5.13Java Functional Interface5.14Multiple Inheritance not Supported in Java5.15Difference Between "throw" and "throws"5.16Overriding Static Method5.17Overriding an Overloaded Method5.18Does a class Inherit Constructors of its Superclass?5.19Create Instances When Constructor is not Defined5.20main() Method in Java5.21equals() Method and == operator5.22Garbage Collection in Java5.23HashMap and Hashtable5.24Local Variable and Instance Variable5.25Heap Memory and Stack Memory5.26main() isn't Declared as static5.27String, StringBuilder, StringBuffer5.28Multithreading in Java5.29final, finalize and finally5.30Enums5.31System Class5.32Global Variables5.33Synchronized Methods or Blocks5.34Iterator and ListIterator5.35Polymorphism
Chapter 6:
Java Coding Practices
6.1Sum of Even and Odd Numbers6.2Numbers in a String6.3Same Sum of Digits in Two Numbers6.4Reverse the Odd Length Words6.5Find all the Words That Starts With a Given Letter6.6Find the Longest Common Prefix in the Given Strings6.7Reverse the Number6.8Product Maximizer6.9Divisible by 56.10Hash6.11Surrrp6.12Pizza Topping Problem6.13GCD of Two Numbers6.14Length of the Largest Block6.15Count Triplets6.16Sum of all Numbers in the String6.17Rightmost Digits6.18Base and Remove String6.19Multiply By Two And Filter Twos6.20Consecutive List of Numbers6.21Has Seven6.22Balanced Array6.23271 Pattern6.24Repeat String6.25Closest Palindrome Number6.26Lucky Seven6.27Count the Number of Lone 5s6.28Harshad Number6.29Find the Missing Letter6.30Concatenate the First and Last Word6.31Standard Deviation
Don't just read questions
Solve questions asked in real interviews
Create a program to check if the given number is prime.
Instructions
- Initialize two variables:
num1
with value 29 andflag
with valuetrue
. - Loop from
i = 2
toi = num -1
. - Inside it, check if
num
is divisible byi
. - If yes, change
flag
tofalse
and terminate the loop. - Print the value of
flag
outside the loop.
Example
The output of the program will be:
true
Main.java
CERTIFICATE OF COMPLETION
This is to certify that
Jane Doe
has successfully completed the course
Java Interview Questions
Gain a competitive edge with our professional certifications
Showcase your expertise on LinkedIn and stand out from the crowd. Impress your potential employers.
CERTIFICATE OF COMPLETION
This is to certify that
Jane Doe
has successfully completed the course
Java Interview Questions
Feedback from our students
Feedback from our students
“The platform is wonderful and will continue to be a step above the rest of what's out there right now.”
“Learning to code is hard, but Programiz PRO has made it easy by being right by my side in my coding journey.”
“On Programiz PRO, the research work is already done by an expert in the background; all you need to do is focus on your learning.”