0% found this document useful (0 votes)
309 views

Java Programming MCQ QB1

This document contains 30 multiple choice questions about basic Java programming concepts. The questions cover topics like who developed Java, Java features like platform independence and multithreading, the Java compilation process including bytecode and the JVM, Java data types and casting, operators, variables, arrays, loops, and the ternary operator. The questions are multiple choice with 4 possible answers for each.

Uploaded by

Saquibh Shaikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
309 views

Java Programming MCQ QB1

This document contains 30 multiple choice questions about basic Java programming concepts. The questions cover topics like who developed Java, Java features like platform independence and multithreading, the Java compilation process including bytecode and the JVM, Java data types and casting, operators, variables, arrays, loops, and the ternary operator. The questions are multiple choice with 4 possible answers for each.

Uploaded by

Saquibh Shaikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

22412 JAVA PROGRAMMING MCQ QB

Unit 1: Basic Syntactical Construct in Java

4th SEM ALL SUBJECT MCQ : click here

1. Java is developed by ___________________


a)Sun Microsystems of USA
b) Microsoft
c)Adobe
d) None

2 ________________ is one of the inventors of Java.


a) Dannis Ritchie
b) James Gosling
c) Bjarne Stroustrup
d) Balagurusamy

3 ____________ is one of the java features that enables java program to run anywhere
anytime.
a)Object-Oriented
b) Multithreaded
c)Platform-Independent
d) Dynamic & Extensible

4 _____________ is one of the java features that can handle multiple tasks
simultaneously.
a)Object-Oriented
b) Dynamic & Extensible
c)Platform-Independent
d) Multithreaded

5 Java compiler translates source code into _____________


a) Bytecode (Virtual Machine Code)
b) Bitcode
c) Machine Code
d) User code
6 Java interpreter translates _____________ into machine code.
a) Bitcode
b) Bytecode(Virtual Machine Code)
c) Machine Code
d) User code

7 Java compiler produces an intermediate code known as _____________


a)Bitcode
b) Machine Code
c)Bytecodes
d) User code

8 ____________ tool helps us to find errors in our programs.


a)jhelp
b) javah
c)javap
d) jdb

9 The ____________ includes hundred of classes and methods grouped into several
function packages.
a)API
b) JVM
c)JAVAC
d) JRE

10 The java interpreter uses ____________ method before any objects are created.
a)Class
b) Main
c)Constructor
d) All of above

11 ____________ is use for naming classes, methods, variables etc in a program.


a)Operator
b) Separator
b)Identifier
d) Constructor

12 ____________ is reserved keyword in java.


a)Abstract
b) Extends
b)Package
d) All of above
13 Java provides an extensive set of classes, arranged in ___________.
a)Package
b) Library file
c)Template class
d) None

14 The process of converting one date type to another is called__________


a)Translating
b) Casting
c)Compiling
d) Declaring

15 Java does not support ______________.


a)Operator overloading
b) Global variable
c)Multiple inheritance
d) All of above

16 Casting from byte to __________ data type, the result is no loss information.
a)short
b) int
c)long
d) all of above

17 Casting from shot to __________ data type, the result is no loss information.
a)byte
b) int
c)long
d) double

18___________ refer to fix value that does not change during the execution of a
program.
a)variables
b) constants
c)identifiers
d) integer

19 ____________ operators are used to construct mathematical expression as in algebra.


a)Relational
b) Mathematical
c)Arithmetic
d) Logical
20 Which constraint must be considered at the time of variable declaration?
a)It should not be keyword
b) It must not begin with digit
c)White space not allowed
d) All of above

21 The comparisons can be done with help of ____________ operator.


a)Relational
c)Arithmetic
b) Mathematical
d) Assignment

22 Which of the following is not an assignment operator?


a)+=
b) = =
c)%=
d) =

23 _____________ operator is used to construct conditional expression.


a)Dot(.)
b) instanceof
c)Ternary(?:)
d) None

24 Which statement is used to terminate the loop early?


a)terminate
b) continue
c)skip
d) break

25 Which statement is used to skip the loop and continue with the next iteration?
a)continue
b) terminate
c)skip
d) break

26 _________ is a group of contiguous or related data items that share a common name.
a)Variable
b) Array
c)Constant
d) none
27 Which of the following is the correct declaration statement in java program?
a) int num=new int[5]
b) int num=new num[5]
c) int[] num=new int[5]
d) None

28 Java __________________.
a)Only compiles
b) Only interprets
c)Compiles and then interprets
d) Interprets & then compile

29 JVM stands for __________________


a)Java Virtual Method
b) Java Virtual Machine
c)Java Variable & Methods
d) Java Versatile Machine

30 Which of the following is a ternary operator?


a)+=
b) ?
c)%=
d) =

Happy Learning!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy