Latest Qualification Jobs


ENTER YOUR E-MAIL FOR FREE JOB ALERTS RIGHT INTO YOUR INBOX -
AFTER THIS, YOU WILL NOT MISS ANY GOVT/PVT VACANCY
Check Your Email To Activate the Confirmation Link

ADVERTISEMENT


Java Programming Questions and Answers | Solved Questions PDF Download

Java Programming Questions and Answers

Those candidates want to be a Java Developer; they must have appeared in Java Technical round during recruitment process. So, before appearing in this round, participants must check Java Programming Questions and Answers. It is the solution to prepare for technical round.

Here, we are providing Solved Questions & Answers of Java Programming Language for those candidates, who are going to appear in any exam or interview for Java Programming Language. From this page, you can download Java Programming Coding Interview Questions in PDF format.

These questions are for both Fresher’s & experienced participants of any exam or interview for Java Programming Language. We, the team of recruitmentresult.com are created this page for the purpose of providing all the solved question answers of Java Programming on the single web portal. So, stays connected with us and grab the details…

Java Programming Questions and Answers

Ques 01: Which of these methods of httpd class is used to read data from the stream?

  1. getDta()
  2. GetResponse()
  3. getStream()
  4. getRawRequest()

Answer: 4

Ques 02: Which of these methods of httpd class is used to get report on each hit to HTTP server?

  1. log()
  2. logEntry()
  3. logHttpd()
  4. logResponse()

Answer: 2

Read Here: Advanced Java Interview Questions and Answers

Ques 03: Which of these methods is used to find a URL from the cache of httpd?

  1. findfromCache()
  2. findFromCache()
  3. serveFromCache()
  4. getFromCache()

Answer: 3

Ques 04: Which of these variables stores the number of hits that are successfully served out of cache?

  1. hits
  2. hitstocache
  3. hits_to_cache
  4. to.cache

Answer: 4

Ques 05: Which of these classes is used for operating on request from the client to the server?

  1. http
  2. httpDecoder
  3. httpConnection
  4. httpd

Answer: 4

Ques 06: Which of these methods of httpd class is used to write UrlCacheEntry object into local disk?

  1. writeDiskCache()
  2. writetoDisk()
  3. writeCache()
  4. writeDiskEntry()

Answer: 1

Ques 07: Which of these methods is used to start a server thread?

  1. run()
  2. start()
  3. runThread()
  4. startThread()

Answer: 1

Check Here: Java Interview Experience

Ques 08: Which of these methods is called when http daemon is acting like a normal web server?

  1. Handle()
  2. HandleGet()
  3. handleGet()
  4. Handleget()

Answer: 3

Ques 09: Which one of these lists contains only Java programming language keywords?

  1. class, if, void, long, Int, continue
  2. goto, instance of, native, finally, default, throws
  3. try, virtual, throw, final, volatile, transient
  4. strictfp, constant, super, implements, do

Answer: 2

Ques 10: Which will legally declare, construct, and initialize an array?

  1. int [] myList = {“1”, “2”, “3”};
  2. int [] myList = (5, 8, 2);
  3. int myList [] [] = {4,9,7,0};
  4. int myList [] = {4, 3, 7};

Answer: 4

Ques11: Which is a reserved word in the Java programming language?

  1. method
  2. native
  3. subclasses
  4. reference

Answer: 2

Ques12: Which one is a valid declaration of a boolean?

  1. boolean b1 = 0;
  2. boolean b2 = ‘false’;
  3. boolean b3 = false;
  4. boolean b4 = Boolean.false();

Answer: 3

Ques13: Which is a valid declaration of a String?

  1. String s1 = null;
  2. String s2 = ‘null’;
  3. String s3 = (String) ‘abc’;
  4. String s4 = (String) ‘\ufeed’;

Answer: 1

Ques 14: What is the numerical range of a char?

  1. -128 to 127
  2. -(215) to (215) – 1
  3. 0 to 32767
  4. 0 to 65535

Answer: 4

Get Here: Advanced Java Syllabus

Ques15: Which is the valid declarations within an interface definition?

  1. public double methoda();
  2. public final double methoda();
  3. static void methoda(double d1);
  4. protected void methoda(double d1);

Answer: 1

Ques16:You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?

  1. public
  2. private
  3. protected
  4. transient

Answer: 3

Ques17: Which of the following code fragments inserted, will allow to compile?

  1. new Inner(); //At line 5
  2. new Inner(); //At line 10
  3. new ot.Inner(); //At line 10
  4. new Outer.Inner(); //At line 10

Answer: 1

Ques 18: What is the prototype of the default constructor?

  1. Test( )
  2. Test(void)
  3. public Test( )
  4. public Test(void)

Answer: 3

Ques 19: Given a method in a protected class, what access modifier do you use to restrict access to that method to only the other members of the same class?

  1. final
  2. static
  3. private
  4. protected

Answer: 3

Check Now: Java Developer Salary In India

Ques20: Which is a valid declaration within an interface?

  1. public static short stop = 23;
  2. protected short stop = 23;
  3. transient short stop = 23;
  4. final void madness(short stop);

Answer: 1

Thanks for reading this article!!!!!! HOPE!!! All readers are satisfied from the above stated information regarding Java Programming Questions and Answers. If, you have any question or suggestion then please drop a comment in given space.

Something That You Should Put An Eye On

Core Java Interview Questions & AnsCore Java Syllabus
Vacancies For Java FreshersHR Interview Questions & Answers
Makes Your Brain Work BetterExam Tips For Competitive Exams
How to Prepare for Written ExamHow to Get in the Mood to Study

Filed in: online quiz

ADVERTISEMENT


Leave a Reply

Submit Comment