Archive Pages Design$type=blogging

Objective Questions on Core Java Language set-2

1) The methods wait() and notify() are defined in A. java.lang.String B. java.lang.Runnable C. java.lang.Object D. java.lang.Thread 2) The d...


1) The methods wait() and notify() are defined in

A. java.lang.String

B. java.lang.Runnable

C. java.lang.Object

D. java.lang.Thread


2) The data or variables, defined within a class are called ..... variables.

A. object

B. class

C. instance

D. schema


3) When we implement the Runnable interface, we must define the method.

A. start()

B. init()

C. run()

D. resume()


4) ........ class must give a concrete method.

A. abstract

B. constructor

C. least

D. program


5) Which exception is thrown by the read() method of input stream class?

A. Exception

B. FileNotFoundException

C. ReadException

D. IOException


6) When a method calls itself, it is called ......

A. recursion

B. distance

C. display

D. problem


7) Which of the following statements are true?

i) An abstract class may not have any final methods.

ii) A final class may not have any abstract methods

iii) An inner class may be declared with any accessibility keyword

iv) Transient variable must be static

A. i and ii

B. ii and iii

C. iii and iv

D. All i, ii, iii and iv


8) Which of the following statements is/are false?

A. A java monitor must either extend thread or implement runnable

B. The sleep() method should be enclosed in try .... catch block.

C. A thread can be temporarily suspended from running by using the wait() method.

D. A suspended thread using suspend() method can be received using the resume() method.


9) What does J2SE mean?

A. Java 2 Platform Standard Edition

B. Java 2 Internet Standard Edition

C. Java 2 System Edition

D. Java 2 Platform Independent Standard Edition


10) An ........ is a special kind of Java program that is designed to be transmitted over the Internet.

A. viewlet

B. applet

C. servlet

D. object

11) Which are the valid ways to create DataInptStream streams?

A. new DataInputStream();

B. new DataInputStream("in.dat', "r");

C. new DataInputStream(new File("in.dat"));

D. new DataInputStream(new FileInputStream("in.dat");


12) finalize() is only called just prior to .....

A. initialization

B. runtime

C. garbage collection

D. destruction


13) When we invoke repaint() for a component, the AWT invokes the method

A. draw()

B. show()

C. update()

D. paint()


14) What is the use of valueOf() method?

A. It converts data from its internal format into a human-readable form.

B. It converts integer value to string

C. It converts string to int value

D. It converts string to float value


15) What is the default thread at the time of starting the program?

A. Main thread

B. Thread Group

C. Child Thread

D. Thread Pool


16) What does the following line of code do?

       TextField text= new TextField(10);

A. Creates text object that can hold 10 rows of text

B. Creates text object that can hold 10 columns of text

C. Creates the object text and initialize it with the value 10

D. The code is illegal


17) .......... is an applet tag.

A. (applet)

B. >applet<

C. <applet>

D. <applet tag>


18) In Java thread to thread communication is called ......

A. Passing

B. sending

C. Messaging

D. Calling


19) AWT stands for

A. abstract window toolkit

B. abstract window toolbar

C. access window toolbar

D. access window toolbar


20) The setBackground() method is part of the class

A. Graphics

B. Applet

C. Component

D. Container

Answers:

1) C. java.lang.Object
2) C. instance
3) D. resume()
4) A. abstract
5) D. IOException
6) A. recursion
7) B. ii and iii
8) A. A java monitor must either extend thread or implement runnable
9) A. Java 2 Plateform Standard Edition
10) B. applet
11) D. new DataInputStream(new FileInputStream("in.dat");
12) C. garbage collection
13) C. update()
14) D. It converts string to float value
15) A. Main thread
16) B. Creates text object that can hold 10 columns of text
17) C. <applet>
18) C. Messaging
19) A. abstract window toolkit
20) C. Component

Related Posts:

تعليقات

الاسم

Artificial Intelligence(AI) Backlinking Basic IT Best List Blogging Tips C C# C++ Computer Architecture Computer Fundamental Computer Security Computer/IT Officer Exam CSS Data Mining and Warehousing Data Recovery Tools Data Structure Database Management System E-commerce E-government Internet & Web Designing IT Law IT Tips and Tricks IT Tutorials Java JavaScript Keyword Research Tools MIS Multiple Choice Question (MCQ) Networking Online Earning Online IT Jobs Operating System Oracle Forms and Reports Programming Guide Programming Language SEO Social Networking Sites Software Download Software Engineering System Analysis and Design Top List VB.Net
false
rtl
item
Max6: Objective Questions on Core Java Language set-2
Objective Questions on Core Java Language set-2
Max6
https://maxs29.blogspot.com/2015/01/objective-questions-on-core-java.html
https://maxs29.blogspot.com/
http://maxs29.blogspot.com/
http://maxs29.blogspot.com/2015/01/objective-questions-on-core-java.html
true
4303790511137642940
UTF-8
لم يتم العثور على اى مواضيع شاهد الكل اقرأ المزيد رد احذف الرد حذف بواسطة الرئيسية صفحات مواضيع شاهد الكل نوصى لك التسميات الارشيف بحث لم يتم العثور على ماتبحث عنه عودة للرئيسية الاحد الاثنين الثلاثاء الاربعاء الخميس الجمعة السبت الاحد الاثنين الثلاثاء الاربعاء الخميس الجمعة السبت يناير فبراير مارس ابريل مايو يونيو يوليو اغسطس سبتمبر اكتوبر نوفمبر ديسمبر يناير فبراير مارس ابريل مايو يونيو يوليو اغسطس سبتمبر اكتوبر نوفمبر ديسمبر just now 1 دقيقة مضت $$1$$ دقيقة مضت 1 hour ago $$1$$ ساعة مضت الامس $$1$$ يوم مضى $$1$$ اسبوع مضى اكثر من 5 اسابيع مضت