Archive Pages Design$type=blogging

MCQ of Java With Answer set-7

1. The .................. and .................... classes are abstract classes that support reading and writing of byte streams. A) reader,...


1. The .................. and .................... classes are abstract classes that support reading and writing of byte streams.
A) reader, writer
B) inputstream, outputstream
C) objectinputstream, objectoutputstream
D) none

2. What is the error in the following code?
     class Test
     {
         abstract void display( );
     }

A) No error
B) Method display( ) should be declared as static
C) Test class should be declared as abstract
D) Test class should be declared as public

3. A package is a collection of
A) classes
B) interfaces
C) editing tools
D) classes and interfaces

4. Which of the following methods belong to the string class?
A) length( )
B) compare To ( )
C) equals ( )
D) All of them

5. What will be the output of the following code?
    byte x=64, y;
    y= (byte) (x<<2);
    System.out.println(y);

A) 0
B) 1
C) 2
D) 64

6. If m and n are int type variables, what will be the result of the expression
    m%n
    when m=5 and n=2 ?
A) 0
B) 1
C) 2
D) None of the above

7. Which of the following control expressions are valid for an if statement?
A) An integer expression
B) A Boolean expression
C) Either A or B
D) Neither A nor B

8. The concept of multiple inheritance is implemented in Java by
A) extending two or more classes
B) extending one class and implementing one or more interfaces
C) implementing two or more interfaces
D) both B and C

9. Which of the following do not represent legal flow control statements?
A) break;
B) return;
C) exit();
D) continue outer;

10. Data input is
A) an abstract class defined in java.io
B) a class we can use to read primitive data types
C) an interface that defines methods to open files.
D) an interface that defines methods to read primitive data types.

Answers:

1.  B) inputstream, outputstream
2.  C) Test class should be declared as abstract
3.  D) classes and interfaces
4.  D) All of them 
5.  A) 0
6.  B) 1
7.  B) A Boolean expression
8.  D) both B and C
9.  C) exit();
10.D) an interface that defines methods to read primitive data types.


You Might also view the following 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: MCQ of Java With Answer set-7
MCQ of Java With Answer set-7
Max6
https://maxs29.blogspot.com/2013/06/mcq-of-java-with-answer-set-7.html
https://maxs29.blogspot.com/
http://maxs29.blogspot.com/
http://maxs29.blogspot.com/2013/06/mcq-of-java-with-answer-set-7.html
true
4303790511137642940
UTF-8
لم يتم العثور على اى مواضيع شاهد الكل اقرأ المزيد رد احذف الرد حذف بواسطة الرئيسية صفحات مواضيع شاهد الكل نوصى لك التسميات الارشيف بحث لم يتم العثور على ماتبحث عنه عودة للرئيسية الاحد الاثنين الثلاثاء الاربعاء الخميس الجمعة السبت الاحد الاثنين الثلاثاء الاربعاء الخميس الجمعة السبت يناير فبراير مارس ابريل مايو يونيو يوليو اغسطس سبتمبر اكتوبر نوفمبر ديسمبر يناير فبراير مارس ابريل مايو يونيو يوليو اغسطس سبتمبر اكتوبر نوفمبر ديسمبر just now 1 دقيقة مضت $$1$$ دقيقة مضت 1 hour ago $$1$$ ساعة مضت الامس $$1$$ يوم مضى $$1$$ اسبوع مضى اكثر من 5 اسابيع مضت