# Top 10 Java Programs for Freshers

August 20, 2014

Welcome to GUVI Blogs.  This is Prashanth, a Java and Selenium Expert. Here are my list of 10 Java coding interview questions and answers, which is good to prepare before appearing on any Java interviews. As I said Java coding questions are mostly based on programming, logical analysis and problem solving skill , so better to get it right in first place. Any way you may be able to solve and find answers of these Java coding questions by yourself, but if you stuck do a google, and you can get many alternative ways to solve these problem. Some times knowing more than one way to solve any programming question or coding problem in Java also helps to impress interviewer. This list mainly contains basic programs asked on Interviews.

Verify a number is Even/Odd

Output

Swapping Numbers without using 3rd variable

Output

Factorial of a number

Output

How to get the prime numbers between a given range.

Output

Check a number is prime or not. Note- A number is prime if it is not divisible by any other number except itself.

Output

Check if a number is Armstrong or not. Note- A number is armstrong if the sum of the cubes of digit of number is equal to the number. ex- 407 = 4*4*4 + 0*0*0 + 7*7*7

Output

Floyd Triangle Note- Floyd Triangle is like 1 2 3 4 5 6 7 8 9 10 ———— Code-

Output

Palindrome of String or reverse a String.

Output

Binary Search

Bubble Sort

## 10 thoughts on “Top 10 Java Programs for Freshers”

1. simhachalam

import java.lang.*;
import java.util.*;
class Palindrome
{
public static void main(String args[])
{
Scanner s1=new Scanner(System.in);
System.out.println(“enter rows”);
int n=s1.nextInt();
int c=0;
for(int i=0;i<n;i++)
{

for(int j=0;j<=i;j++)
{
System.out.print(++c);

}
System.out.println();
}

}
}