• Result
  • Today's Puzzle
    • Previous Puzzles
    • Prize & Rules
  • Discussion Board
    • Suggestion Board
    • Trending Articles
  • Maths Tricks
  • Placement Papers
    • Placement Questions
    • Interview Experience
    • Placed user Comment
    • Group Discussion
  • English APP
  • login
  • Result
  • Today's Puzzle
    • Previous Puzzles
    • Prize & Rules
  • Discussion Board
    • Suggestion Board
    • Trending Articles
  • Maths Tricks
  • Placement Papers
    • Placement Questions
    • Interview Experience
    • Placed user Comment
    • Group Discussion
  • Walkins
    • Corporate Job Exam
    • Government Job Exam
    • Entrance Exam
  • Training
    • Internship
  • Placement Questions
  • /
  • Java

Frequently Asked Java interview questions and answers for freshers Page 6

Java Select Another Category Select Another Topic

Programming and Technical

  • Android 118
  • ASP.NET 60
  • C 459
  • C++ 448
  • DATA STRUCTURE 66
  • DBMS 77
  • ELECTRONICS 39
  • Java 261
  • OOPs Concepts 117
  • Operating Syst 103
  • RDBMS 109
  • UNIX 70

Java Question Topics

    Category (1)

    General Ability (3)

  • General Knowledge (3)
  • HR Interview (3)

  • Interview (3)
  • Logical Reasoning (5)

  • Blood Relations (1)
  • Coding Decoding (2)
  • Cryptography (1)
  • Seating Arrangement (1)
  • Numerical Ability (4)

  • Algebra (1)
  • Number System (1)
  • Profit and Loss (1)
  • Programming (124)

  • Arrays (7)
  • Basics (5)
  • Database (4)
  • Definition (25)
  • Functions (3)
  • Output (4)
  • Program (20)
  • Puzzles (1)
  • Technical (43)
  • Verbal Ability (1)

  • Miscellaneous (1)
Keep an EYE (0)
Solved Question (3) UnSolved Question (258)
Pages: 27FirstPrev234567891011NextLast
Advertisements

(#M40018882) JAVA QUESTION JAVA QUESTIONS Keep an EYE Keep an eye puzzle Keep an eye puzzle

public class Test
{
public static void main(String[] args)
{
int x = 0;
assert (x > 0) : "assertion failed"; /* Line 6 */
System.out.println("finished");
}
}

A. finished
B. Compilation fails.
C. An AssertionError is thrown.
D. An AssertionError is thrown and finished is output.

Asked In Java (12 years ago)
Unsolved Read Solution (3)
Is this Puzzle helpful?   (3)   (1) Submit Your Solution Program

(#M40154942) JAVA QUESTION coding Keep an EYE Keep an eye puzzle Keep an eye puzzle

Write a function that accepts a sentence as a parameter, and returns the same with each of its words reversed. The returned sentence should have 1 blank space between each pair of words.

Demonstrate the usage of this function from a main program.

Example:
Parameter: “jack and jill went up a hill”
Return Value: “kcaj dna llij tnew pu a llih”

Asked In Java jagrti porwal (9 years ago)
Unsolved Read Solution (10)
Is this Puzzle helpful?   (10)   (1) Submit Your Solution Arrays
Advertisements

(#M40018970) JAVA QUESTION Advanced JAVA questions Keep an EYE Keep an eye puzzle Keep an eye puzzle

What is difference between Generic
Servlet and HTTP Servelet?

Asked In Java (12 years ago)
Unsolved Read Solution (3)
Is this Puzzle helpful?   (4)   (1) Submit Your Solution Coding Decoding

(#M40166398) JAVA QUESTION Keep an EYE Keep an eye puzzle Keep an eye puzzle

21. you have three dice each side is numbered as 1,2,3,4,5,6 .you have to take a
number from user check that number as sum of any side number of these
three dice.like we take number as 5 then the possibility are (1,1,3) (1,2,2)
(1,3,1) (2,1,2) (2,2,1) (3,1,1) and is 6 possibility. So write to a program for that.

Asked In Java Varun Kumar yr (5 years ago)
Unsolved Read Solution (1)
Is this Puzzle helpful?   (6)   (5) Submit Your Solution Arrays

(#M40018930) JAVA QUESTION Advanced JAVA questions Keep an EYE Keep an eye puzzle Keep an eye puzzle

Why main method is static?

Solution
because object is not required to call static method if It were non-static method,jvm creats object first then call main() method that will lead to the problem of extra memory allocation.

Like manish sir answer on facebook.

Asked In Java (12 years ago)
Solved Read Solution (4)
Is this Puzzle helpful?   (4)   (1) Submit Your Solution Program

(#M40157238) JAVA QUESTION Dinfference Keep an EYE Keep an eye puzzle Keep an eye puzzle

Distinguish class and object?

Asked In Java Surendra Naraga (9 years ago)
Unsolved Read Solution (10)
Is this Puzzle helpful?   (9)   (4) Submit Your Solution Basics

(#M40155917) JAVA QUESTION The Difference between == operator and equals() method? Keep an EYE Keep an eye puzzle Keep an eye puzzle

Which is the correct option for comparing the contents of 2 String objects?
[1] == operator
[2] equals() method
[3] Both

Asked In Java Rishikesh Agrawani (9 years ago)
Unsolved Read Solution (34)
Is this Puzzle helpful?   (27)   (5) Submit Your Solution Functions

(#M40018860) JAVA QUESTION JAVA QUESTIONS Keep an EYE Keep an eye puzzle Keep an eye puzzle

Which interface does java.util.Hashtable implement?
1) Java.util.Map
2) Java.util.List
3) Java.util.HashTable
4) Java.util.Collection

Asked In Java (12 years ago)
Unsolved Read Solution (9)
Is this Puzzle helpful?   (13)   (4) Submit Your Solution Technical

(#M40018965) JAVA QUESTION Advanced JAVA questions Keep an EYE Keep an eye puzzle Keep an eye puzzle

Which is true about a method-local inner class?

A. It must be marked final.
B. It can be marked abstract.
C. It can be marked public.
D. It can be marked static.

Asked In Java (12 years ago)
Unsolved Read Solution (5)
Is this Puzzle helpful?   (16)   (10) Submit Your Solution Program

(#M40166286) JAVA QUESTION NEAREST PERFECT SQUARE Keep an EYE Keep an eye puzzle Keep an eye puzzle

Find the nearest perfect square of the given number.
Sample input:600
Sample output:576.

Sample input:47011
Sample output:47089

Asked In Java Arun (6 years ago)
Solved divya Read Solution (1)
Is this Puzzle helpful?   (5)   (2) Submit Your Solution Database
Keep an EYE (0)
Solved Question (3) UnSolved Question (258)
Pages: 27FirstPrev234567891011NextLast
  • Login
  • Register

Resend

Sponsored Links

Advertisements

Challenger of the Day

no image
Dimple
India
Punjab
Time: 00:01:33
Points
19

Maths Quotes

The person who can solve mathematical problems,can lead life easily ,Maths tellu that every problem as solution...we can find number of solutions for one problem ...Aplly it in the life also we can lead our life happily...

swetha

my math textbook is my role model. no matter how many problems it has it never sucide's.

prabhpreet singh

Placed User Comments

M4Math helped me a lot.

Vipul Chavan 5 years ago

Thanks m4 maths for helping to get placed in several companies.
I must recommend this website for placement preparations.

yash mittal 5 years ago

Now enjoy Offline Access of latest Question.

Get M4maths app to avail expert's solution and latest selected questions.

Download m4maths app now

  • 2533K+Registerd user
  • 1774K+Engineers
  • 759K+MBA Asprirant
  • 3K+Enginnering College
  • 250+Company Exam
  • 150K+Interview Questions
  • Site Links
  • Home
  • Result
  • Today's Puzzle
  • Discussion Board
  • Maths Tricks
  • Advertise with us
  • Contact Us
  • Useful Info
  • Maths Quotes
  • Previous Puzzles
  • Prize
  • Privacy Policy
  • Disclaimer and Copyright
  • Terms and Conditions
  • Sitemap
  • Placement papers
  • TCS Placement Paper
  • HCL Placement Paper
  • INFOSYS Placement Paper
  • IBM Placement Paper
  • SYNTEL Placement Paper
  • TECHNICAL Interview
  • HR Interview
All rights are reserved to @m4maths.com