1. Which is true? A. "X extends Y" is correct if and only if X is a class and Y is an interface B. "X extends Y" is correct if and only if X is an interface and Y is a class C. "X extends Y" is cor... rect if X and Y are either both classes or both interfaces D. "X extends Y" is correct for all combinations of X and Y being classes and/or interfaces 2. Which of the following is true? 1 A class can extend more than one class. 2. A class can extend only one class but many interfaces. 3. An interface can extend many interfaces. 4. An interface can implement many interfaces. 5. A class can extend one class and implement many interfaces. A. 1 and 2 B. 2 and 4 C. 3 and 5 D. 3 and 4 E. 2 and 5 3. How many primitive data types are there in Java? A. 6 B. 7 C. 8 D. 9 4. In Java byte, short, int and long all of these are A. signed B. unsigned C. Both of the above D. None of these 5. Size of int in Java is A. 16 bit B. 32 bit C. 64 bit D. Depends on execution environment 6. What is the output of the following program? public class Test{ static int x = 10 ; public static void main(String[] a){ Test test = new Test( ) ; Test test1 = new Test( ) ; test.x += 1 ; System.out.println( test.x + test1.x ) ; } } A. 20 B. 21 C. 22 D. Compilation Error E. Throws Exception 7. Which of the following is not a Java features? a) Dynamic b) Architecture Neutral c) Use of pointers d) Object-oriented 8. Which of the following is a valid declaration of a char? a) char ch = '\utea'; b) char ca = 'tea'; c) char cr = \u0223; d) char cc = '\itea [Show More]
Last updated: 1 year ago
Preview 1 out of 6 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Add to cartInstant download
We Accept:
Connected school, study & course
About the document
Uploaded On
Jul 12, 2022
Number of pages
6
Written in
This document has been written for:
Uploaded
Jul 12, 2022
Downloads
0
Views
137
In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Browsegrades · High quality services·