0% found this document useful (0 votes)
5 views

CoreJava Coding Questions

Java questions and notes

Uploaded by

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

CoreJava Coding Questions

Java questions and notes

Uploaded by

sowmyakodi01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Core Java Interview Questions:

"Datatypes, OOPs concepts, Threads, JDBC, Collection & Exception Handling.


What is datatypes ? Explain about it.
What is method overloading & Overriding?
What is List?
Collection Interface?"
Aptitude/Reasoning - Time & Distance, Profit-Loss"
"Core Java & Advance Java
What are the datatypes & Operators?
What is abstraction? give examples.
What is the difference between Overloading & Overriding.
How do you create a thread?
-------
Blood relations, Psuedo code, Pressure, etc."
Psuedo code, sql query
: 1. Project description questions, JDBC, Spring boot, annotations and mysql
based questions.
Coding Question:
=================================
1.Reverse a String: Write a program to reverse a given string (e.g., 'Hello
World').
2.Check if a Number is Prime: Write a program that checks if a given integer is a
prime number.
3.Fibonacci Series: Write a program to print the Fibonacci series up to n terms.
4.Factorial of a Number: Write a program to calculate the factorial of a given
number.
5.Check Palindrome: Create a program to check if a given string is a palindrome
(e.g., 'madam').
6.Sum of Digits: Write a program to find the sum of the digits of an integer.
7.Find Largest Element in an Array: Write a program to find the largest element
in a given integer array.
8.Write a program to find the sum of elements at even indices in an integer
array.
9.Remove Duplicates from an Array: Write a program to remove duplicate
elements from an integer array.
10."Print a Pattern: Write a program to print the following pattern:
1
22
333
4444
5 5 5 5 5."
11.Count Vowels in a String: Write a program to count the number of vowels in
a given string.
12.Check for Armstrong Number: Write a program to check if a number is an
Armstrong number (e.g., 153).
13.Reverse an Array: Write a program to reverse the elements of an integer
array.
14.Bubble Sort: Write a program to sort an integer array using the bubble sort
algorithm.
15.Linear Search: Write a program to implement linear search on an array of
integers.
16.Check Anagram: Write a program to check if two strings are anagrams of
each other.
17.GCD of Two Numbers: Write a program to find the GCD (Greatest Common
Divisor) of two integers.
18.Convert Celsius to Fahrenheit: Write a program to convert a temperature
from Celsius to Fahrenheit.
19.Find the Missing Number: Given an array containing n distinct numbers
taken from 0, 1, 2, ..., n, find the missing number.
20.Count Words in a String: Write a program to count the number of words in a
given string.
21."Print a Triangle Pattern: Write a program to print the following triangle
pattern:
*
*
***."
22.Check if String is Substring: Write a program to check if one string is a
substring of another.
23."Write a program to print the following number pyramid:
1
22
333
4444
5 5 5 5 5"
24.Find Second Largest Number in an Array: Write a program to find the second
largest number in a given integer array.
25.Count Digits in a Number: Write a program to count the number of digits in
a given integer.
26.Convert Decimal to Binary: Write a program to convert a decimal number to
its binary equivalent.
27.Calculate Power of a Number: Write a program to calculate x raised to the
power n.
28.Check for Perfect Number: Write a program to check if a number is a perfect
number (e.g., 28).
29.Find the Intersection of Two Arrays: Write a program to find the intersection
of two arrays.
30.Check for Palindrome Number: Write a program to check if a number is a
palindrome (e.g., 121).
31.Write a program to count the number of consonants in a given string (e.g.,
"Hello World").
32.Write a program to check if a given number is both a palindrome and a
prime (e.g., 131).
33.Write a program to find and print the longest word in a given sentence. (eg.,
"I love Java Programming Language.")

You might also like