TOP 10 Java Programs for Freshers

guvi   August 20, 2014   8 Comments

Welcome to GUVI Blogs.  This is Prashanth, a Java and Selenium Expert.

java_logo-245132408_std1

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

Want to get strong in JAVA? Checkout our Free Java Course in Tamil

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

Want to get strong in JAVA? Checkout our Free Java Course in Tamil

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

Want to get strong in JAVA? Checkout our Free Java Course in Tamil

 

Related Posts

1500+ Java Interview Questions and Answers

Best Java IDEs

Attending the Interview is like Impressing a girl – Interview Tips for Freshers

How to succeed in Campus Interviews (Important Tips)

 

8 thoughts on “TOP 10 Java Programs for Freshers

  1. Pingback: Blogging beginner’s guide: 10 elements of a successful blog post | guvi blogs

  2. Pingback: Random programming questions in Java for beginners

  3. Pingback: Random programming questions in Java for beginners

  4. Pingback: Should I start my career with a Startup or a big MNC? | guvi blogs

  5. Pingback: 1500+ Java Interview Questions and Answers | Guvi - Share What You Know

  6. 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();
    }

    }
    }

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">