• 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 4

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: 27FirstPrev123456789NextLast
Advertisements

(#M40167134) JAVA QUESTION throw keyword Keep an EYE Keep an eye puzzle Keep an eye puzzle

What will be the output of the program?

public class RTExcept
{
public static void throwit ()
{
System.out.print("throwit ");
throw new RuntimeException();
}
public static void main(String [] args)
{
try
{
System.out.print("hello ");
throwit();
}
catch (Exception re )
{
System.out.print("caught ");
}
finally
{
System.out.print("finally ");
}
System.out.println("after ");
}
}

A. hello throwit caught finally after
B. Compilation fails
C. hello throwit RuntimeException caught after
D. hello throwit caught

Asked In Java Jax (3 years ago)
Unsolved Read Solution (2)
Is this Puzzle helpful?   (0)   (0) Submit Your Solution

(#M40167133) JAVA QUESTION try, catch and finally Keep an EYE Keep an eye puzzle Keep an eye puzzle

Which of the given fact(s) are true with respect to the blocks and order of execution of blocks in "Exceptions"?

A. The try block can be followed by finally block and then followed by the catch blocks
B. One or more catch blocks which are exception handlers are placed immediately after the try block
C. Catch block has an argument which can accept an argument of any exception type and it is the name of a class that inherits from the Throwable class
D. The finally block always executes when the try block exits or when an exception occurs
E. The finally block is not executed when there is a return statement in the try block

Asked In Java Jax (3 years ago)
Unsolved Read Solution (2)
Is this Puzzle helpful?   (1)   (3) Submit Your Solution Technical
Advertisements

(#M40167131) JAVA QUESTION Exceptions Keep an EYE Keep an eye puzzle Keep an eye puzzle

Observe the code.

public class Sample {

public static void main(String args[]) {

int i=10,j=0,k;

try {

k=i/j;

}

catch(Exception e) {

System.out.println("Exception");

}

catch(ArithmeticException e) {

System.out.println("Arithmetic exception");

}

}

}

Predict the output.

A. ArithmeticException
B. Compilation Fails
C. Exception
ArithmeticException
D. Runtime exception

Asked In Java Jax (3 years ago)
Unsolved Read Solution (2)
Is this Puzzle helpful?   (1)   (3) Submit Your Solution Technical

(#M40167136) JAVA QUESTION Checked vs unchecked Exceptions Keep an EYE Keep an eye puzzle Keep an eye puzzle

_____ exceptions are automatically propagated. To propogate _____ exceptions, the method should explicitly throw the exception using the throws keyword.

A. checked, unchecked
B. unchecked, checked

Asked In Java Jax (3 years ago)
Unsolved Read Solution (2)
Is this Puzzle helpful?   (2)   (0) Submit Your Solution

(#M40167130) JAVA QUESTION finally block Keep an EYE Keep an eye puzzle Keep an eye puzzle

finally block will get executed whether or not an exception occurs. State True or False

Asked In Java Jax (3 years ago)
Unsolved Read Solution (3)
Is this Puzzle helpful?   (0)   (0) Submit Your Solution Technical

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

public class While
{
public void loop()
{
int x= 0;
while ( 1 ) /* Line 6 */
{
System.out.print("x plus one is " + (x + 1)); /* Line 8 */
}
}
}


public class While
{
public void loop()
{
int x= 0;
while ( 1 ) /* Line 6 */
{
System.out.print("x plus one is " + (x + 1)); /* Line 8 */
}
}
}

Which statement is true?

A. There is a syntax error on line 1.
B. There are syntax errors on lines 1 and 6.
C. There are syntax errors on lines 1, 6, and 8.
D. There is a syntax error on line 6.

Asked In Java (12 years ago)
Unsolved Read Solution (5)
Is this Puzzle helpful?   (12)   (8) Submit Your Solution Technical

(#M40155163) JAVA QUESTION General awareness Question On Class and objects Related? Keep an EYE Keep an eye puzzle Keep an eye puzzle

Have You Seen A "Tree"??
a)Yes b)No
The above question is related to class and Object....If you say Yes/No....please Submit your reason also

Asked In Java Ravi teja (9 years ago)
Unsolved Read Solution (4)
Is this Puzzle helpful?   (30)   (8) Submit Your Solution General Knowledge

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

What is RMI and what are the services
in RMI?

Asked In Java (12 years ago)
Unsolved Read Solution (2)
Is this Puzzle helpful?   (2)   (0) Submit Your Solution undefined

(#M40167125) JAVA QUESTION String objects Keep an EYE Keep an eye puzzle Keep an eye puzzle

What is special about string objects as compared to objects of other derived types?(More than 1 may be correct)

A. Java provides string constant pool to store the string objects
B. You can concatenate two string objects using ‘+’
C. You can create string objects without or without using new operator

Asked In Java Jax (3 years ago)
Unsolved
Is this Puzzle helpful?   (0)   (0) Submit Your Solution

(#M40167112) JAVA QUESTION Java question Keep an EYE Keep an eye puzzle Keep an eye puzzle

Which three statements are true?

A. A method with the same signature as a private final method in class X can be implemented in a subclass of X.
B. A protected method in class X can be overridden by a subclass of A only if the subclass is in the same package as X.
C. A private static method can be called only within other static methods in class X.
D. A public static method in class X can be called by a subclass of X without explicitly referencing the class X.
E. A protected method in class X can be overridden by any subclass of X.
F. A final method in class X can be abstract if and only if X is abstract.
G. A non-static public final method in class X can be overridden in any subclass of X.

Asked In Java Jax (3 years ago)
Unsolved
Is this Puzzle helpful?   (0)   (0) Submit Your Solution Technical
Keep an EYE (0)
Solved Question (3) UnSolved Question (258)
Pages: 27FirstPrev123456789NextLast
  • Login
  • Register

Resend

Sponsored Links

Advertisements

Challenger of the Day

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

Maths Quotes

Common sense is the collection of prejudices acquired by age eighteen.

Albert Einstein

Stop the "differentiation" in society, it is "integration" what we need.

ChaZ-E

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