CBSE Class 12 Computer Science Java Basics MCQs Set A

Refer to CBSE Class 12 Computer Science Java Basics MCQs Set A provided below available for download in Pdf. The MCQ Questions for Class 12 Computer Science with answers are aligned as per the latest syllabus and exam pattern suggested by CBSE, NCERT and KVS. Multiple Choice Questions for Java Basics are an important part of exams for Class 12 Computer Science and if practiced properly can help you to improve your understanding and get higher marks. Refer to more Chapter-wise MCQs for CBSE Class 12 Computer Science and also download more latest study material for all subjects

MCQ for Class 12 Computer Science Java Basics

Class 12 Computer Science students should refer to the following multiple-choice questions with answers for Java Basics in Class 12.

Java Basics MCQ Questions Class 12 Computer Science with Answers

 

Question: Java is an object-oriented programming language developed by _______.

a) Oracle

b) Sun Micro systems

c) Unix

d) Netscape

Answer: Sun Micro systems

 

Question: _______ is a company best known for its high-end Unix workstations.

a) Oracle

b) Sun Micro systems

c) Unix

d) Netscape

Answer: Sun Micro systems

 

Question: Modeled after C++, the _____ language was designed to be small, simple and portable across platforms and operating systems both at the source and at the binary level.

a) Java

b) C

c) Basic

d) PHP

Answer: Java

 

Question: Java language was developed at Sun Micro systems in _____

a) 1993

b) 1992

c) 1991

d) 1990

Answer: 1992

 

Question: _______ is small, fast, efficient and easily portable to a wide range of hardware devices.

a) Java

b) C

c) Basic

d) PHP

Answer: Java

 

Question: ______ language is considered as one of the ideal language for distributing executable programs via the World Wide Web.

a) Java

b) C

c) Basic

d) PHP

Answer: Java

 

Question: Java is also a general-purpose programming language for developing programs that are \ easily usable and portable across different.

a) Tables

b) Stands

c) Libraries

d) Platforms

Answer: Platforms

 

Question: Java is an __________ language and here it differs from C.

a) Procedure-oriented

b) Structure-oriented

c) Object-oriented

d) Executable-oriented

Answer: Object-oriented

 

Question: Using _______one can take full advantage of object-oriented methodology and its capabilities of creating flexible, modular and reusable code.

a) Java

b) C

c) Basic

d) PHP

Answer: Java

 

Question: Java includes a set of ___________that provide basic data types, system input and output capabilities and other utility functions.

a) Class libraries

b) Class functions

c) Class methods

d) All of these

Answer: Class libraries

 

Question: These basic classes are part of the ________ .

a) KDJ

b) JDK

c) DKJ

d) DJK

Answer: JDK

 

Question: _______ has classes to support networking, common Internet protocols and user interface toolkit functions.

a) KDJ

b) JDK

c) DKJ

d) DJK

Answer: JDK

 

Question: ______ is platform-independent at both the source and binary level.

a) Java

b) C

c) Basic

d) PHP

Answer: Java

 

Question: ______ independence is a program's capability of being moved easily from one computer system to another.

a) Table

b) Program

c) Library

d) Platform

Answer: Platform

 

Question: At the ______ level, Java's primitive data types have consistent sizes across all development platforms.

a) Beginning

b) Destination

c) Source

d) Binary

Answer: Source

 

Question: At ______ level, platform-independence is possible due to byte code interpreter.

a) Beginning

b) Destination

c) Source

d) Binary

Answer: Binary

 

Question: The designers of Java chose to use a combination of ______ and interpretation.

a) Assembling

b) Compilation

c) Togetherness

d) All of these

Answer: Compilation

 

Question: Full form of JDK is_________

a) Java Developing Kit

b) Java Development Kit

c) Both (A) and (B)

d) None of these

Answer: Java Development Kit

 

Question: Programs written in Java are compiled into____________language for a computer that doesn't really exist.

a) Machine

b) Assembly

c) C++

d) Java

Answer: Machine

 

Question: The so-called "virtual" computer is known as

a) JMV

b) VMJ

c) JVM

d) MVJ 21)

Answer: JVM

 

Question: The full form of JVM is____________

a) Java Virtual Machine

b) Java Visible Machine

c) Java Viable Machine

d) None of these

Answer: Java Virtual Machine

 

Question: The machine language for the Java Virtual Machine is called Java___________

a) byte

b) byte numbers

c) byte code

d) bytes

Answer: byte code

 

Question: Different Java byte code__________is needed for each type of computer.

a) Compiler

b) Interpreter

c) Translator

d) None of these

Answer: Interpreter

 

Question: Java binary files are actually in a form called________that is not specific to any one processor or any operating system.

a) bytes

b) binary numbers

c) byte codes

d) byte

Answer: byte codes

 

Question: A disadvantage of using__________is its slow execution speed.

a) ASCII codes

b) binary numbers

c) byte codes

d) bytes

Answer: byte codes

 

Question: There are tools available tools to convert________into native code.

a) Java Byte codes

b) Java Language

c) Java Complies

d) All of these

Answer: Java Byte codes

 

Question: __________code is faster to execute, but then it does not remain machine independent.

a) Native

b) Original

c) ASCII

d) Binary

Answer: Native

 

Question: A Java Program should have at least one____________and it must have main___________in it

a) Class, procedure

b) Class, variable

c) Class, method

d) Class, code

Answer: Class, method

 

Question: A Java program is composed of____________

a) Functions

b) Classes

c) Programs

d) Variables

Answer: Classes

 

Question: C programmers can think of a class as a sort of creating a new composite data type by using_________and________

a) Structures, type

b) Functions, define

c) Classes, type def

d) Struct, type def

Answer: Struct, type def

Question: _______________can provide much more than just a collection of data.

a) Functions

b) Classes

c) Programs

d) Variables

Answer: Classes

 

Question: Note that__________is not available in Java.

a) Type def

b) Struct

c) Both (A) and (B)

d) All of these

Answer: Both (A) and (B)

 

Question: Java source file can be created using any plain_______text editor.

a) Native

b) Original

c) ASCII

d) Binary

Answer: ASCII

 

Question: Java_____files are given the same name as the class defined with an extension of Java.

a) Beginning

b) Destination

c) Source

d) Binary

Answer: Source

 

Question: In Java the_______name is case sensitive.

a) Folder

b) Class

c) First

d) Last

Answer: Class

 

Question: In Java the______name is case sensitive.

a) File

b) Folder

c) First

d) Last

Answer: File

 

Question: If class name is CallCost, filename should be

a) callcost

b) callcost.java

c) callCost.java

d) callcosT.java

Answer: callCost.java

 

Question: The source file is compiled using the_______compiler.

a) S Cite

b) C++

c) Basic

d) Java

Answer: Java

 

Question: To compile the Java program, type________followed by the name the source file

a) javac

b) JavaC

c) Java

d) cjava

Answer: javac

 

Question: When the program gets compiled without errors, compiler created a file with extension________in the same directory as the source file

a) .Java

b) .javac

c) .class

d) .javaclass

Answer: .class

 

Question: The programmer can run the application using Java______

a) Compiler

b) Translator

c) Interpreter

d) None of these

Answer: Interpreter

 

Question: In_______the Java interpreter is called by simply using Java

a) JDK

b) JKD

c) JDD

d) JKK

Answer: JDK

 

Question: Which of the following variable declarations is correct ?

a) Double balance

b) Double rate

c) Double duration

d) Double cost

Answer: Double rate

 

Question: Java source program file should have extension

a) Java

b) .javac

c) .class

d) .javaclass

Answer: Java

 

Question: The name of_______is same as the class name containing main method and it has an extension .class.

a) Interpreted file

b) Code file

c) Compiled file

d) byte code file

Answer: byte code file

 

Question: A________'Java' interprets byte code and excuses it.

a) Compiler

b) Translator

c) Interpreter

d) None of these

Answer: Interpreter

 

Question: The texts after________are comments.

a) //

b) \\

c) // //

d) \\ \\

Answer: //

 

Question: The text enclosed within_________are comments.

a) /& and &/

b) /* and */

c) /* and *\

d) //* and *//

Answer: /* and */

 

Question: Comments are not compiled or interpreted

a) Codes

b) Classes

c) Comments

d) Methods

Answer: Comments

 

Question: Variables are declared using___________followed by variable name

a) Data type

b) Int

c) Char

d) Float

Answer: Data type

 

Question: Several___________(also called function or method in Java) call statements are used to display information to the user of the program

a) Super routine

b) Subroutine

c) Sub program

d) None of these

Answer: Subroutine

 

Question: Computation part contains expressions including assignment___________

a) Sentences

b) Numerical

c) Operators

d) Statements

Answer: Statements

 

Question: ____________are used to display results.

a) Methods

b) Classes

c) Outputs

d) Prints

Answer: Methods

 

Question: System.out.print and System.out.println are_________which take a value to be displayed as an argument.

a) Methods

b) Classes

c) Outputs

d) Prints

Answer: Methods

 

Question: ___________adds a line feed after the end of the information that it displays.

a) out.print

b) out.prindnt

c) output.print

d) output.println

Answer: out.prindnt

 

Question: When the program is run, the Java interpreter calls the__________method and the statements that it contains are executed.

a) Main()

b) String[]

c) string[] args

d) main()

Answer: main()

 

Question: The___________routine can call other subroutines that are defined in the same class or even in other classes.

a) Main()

b) String[]

c) string[] args

d) main()

Answer: main()

 

Question: It is the_________routine that determines how and in what the other subroutines are used.

a) Main()

b) String[]

c) string[] args

d) main()

Answer: main()

 

Question: The word in the first line of main() means that this routine can be called from outside the program

a) private

b) Public

c) public

d) Private

Answer: public

 

Question: This is essential because the main() routine is called by the Java interpreter, which is__________to the program

a) External

b) Internal

c) Outside

d) Inside

Answer: External

 

Question: Start S Cite application. Select File ->

a) Save

b) New

c) Open

d) Start

Answer: New

 

Question: To save the file, select File __________command.

a) Save

b) New

c) Open

d) Start

Answer: Save

 

Question: _________editor is used to create Java application.

a) Notepad

b) Wordpad

c) S Cite

d) Word

Answer: S Cite

 

Question: To compile a source program use___________Compile command.

a) File

b) Edit

c) Tools

d) Buffers

Answer: Tools

 

Question: If the program is compiled without any error, execute it using___________Go command

a) File

b) Edit

c) Tools

d) Buffers

Answer: Tools

 

Question: Programming____________differ from ordinary human languages in being completely unambiguous and very strict about what is and is not allowed in a program

a) Rules

b) Methods

c) Files

d) Languages

Answer: Languages

 

Question: The rules that determine what is allowed to be used in a language are called the_________of the language

a) Protocols

b) Syntax

c) Methodology

d) Regulations

Answer: Syntax

 

Question: ____________rules specify the basic vocabulary of the language and how programs can be constructed using things like variables, expressions, statements, branches, loops and methods

a) Protocol

b) Syntax

c) Methodology

d) Regulation

Answer: Syntax

 

Question: A syntactically correct program is one that can be successfully_________or interpreted

a) Compiled

b) Understood

c) Executed

d) Put together

Answer: Compiled

 

Question: In a Java program, text in__________bracket is used as a placeholder that describes something actual we need to type while writing actual program

a) Curly

b) Square

c) Angle

d) Round

Answer: Angle

 

Question: Which of the following is an Angle bracket

a) <>

b) { }

c) ( )

d) [ ]

Answer: <>

 

Question: As Java is an object-oriented language. Everything is defined as part of_______

a) Program

b) Procedure

c) List

d) Class

Answer: Class

 

Question: The definition of the method (function) in Java consists of function header and the sequence of statements enclosed between braces________

a) <>

b) { }

c) ( )

d) [ ]

Answer: { }

 

Question: A method in Java program cannot exist by itself. It has to be a part of a___________

a) Program

b) Procedure

c) List

d) Class

Answer: Class

 

Question: Based on the structure of a Java program_____________in the first line is the name of the class having main method in it

a) Class-name

b) Public

c) Class

d) Name

Answer: class-name

 

Question: Class file, CallCost.class, contains the translation of the program into Java____________which can be executed by a Java interpreter

a) bytes

b) binary number

c) bytecode

d) byte

Answer: bytecode

 

Question: If the name of the class is CallCost, then the program should conventionally be saved in a Java source file with a name__________

a) CallCost.class

b) CallCost.java

c) callcost.java

d) CallCost

Answer: CallCost.java

 

Question: When this file is compiled, another file named_____________is generated

a) CallCost.class

b) CallCost.java

c) callcost.java

d) CallCost

Answer: CallCost.class

 

Question: Variable and method declaration after and before___________method is optional

a) main{}

b) string[]

c) string[] args

d) main()

Answer: main()

 

Question: Each program must have one______that contains public method main()

a) Program

b) Procedure

c) List

d) Class

Answer: Class

 

Question: The entire Java program can be written together on single line but_________is important to make it more readable

a) Display

b) Layout

c) Plan

d) Design

Answer: Layout

 

Question: Java is a______format language.

a) Free

b) Busy

c) Object

d) Class

Answer: Free

 

Question: The entire Java program can be written together on single line but______is important to make it more readable.

a) Display

b) Layout

c) Plan

d) Design

Answer: Layout

 

Question: A program can contain other methods besides_______as well as other variables.

a) Main()

b) String[]

c) string[] args

d) main()

Answer: main()

 

Question: Which of the following are the basic java statements used within a method definition such as main()?

a) Data Types

b) Variables

c) Literals

d) All of these

Answer: All of these

 

Question: Which of the following are the basic Java statements used within a method definition such as main() ?

a) Comments

b) Java statements and expressions

c) Arithmetic operators

d) All of these

Answer: All of these

 

Question: Which of the following are the basic java statements used within a method definition such as main() ?

a) Comparisons

b) Logical operators

c) Both (A) and (B)

d) None of these

Answer: Both (A) and (B)

 

Question: _______determines the required memory size, type of values, range of values and type of operations that can be performed.

a) Data Types

b) Variables

c) Literals

d) All of these

Answer: Data Types

 

Question: Java supports______primitive data types that handle common types for integers, floating point numbers, characters and Boolean values (true or false).

a) Seven

b) Eight

c) Nine

d) Ten

Answer: Eight

 

Question: The primitive______are named byte, short, int, long, float, double, char, Boolean.

a) Data types

b) Variables

c) Literals

d) All of these

Answer: Data types

 

Question: T&E first four data types hold_____

a) Real numbers

b) Integers

c) Single character

d) True or False

Answer: Integers

 

Question: The next two data types hold_____

a) Real numbers

b) Integers

c) Single character

d) True or False

Answer: Real numbers

 

Question: Char data type holds a single character from the Unicode character set.

a) Real numbers

b) Integers

c) Single character

d) True or False

Answer: Single character

 

Question: The Boolean data type holds one of the two logical values true or false.

a) Real numbers

b) Integers

c) Single character

d) True or False

Answer: True or False

 

Question: The data types in Java are called______as they are built into the system.

a) Fixed

b) Ancient

c) Primitive

d) New

Answer: Primitive

 

Question: In Java the______are machine-independent, this means that they can be relied on their sizes and characteristics to be consistent across all Java programs on all machines.

a) Data Types

b) Variables

c) Literals

d) All of these

Answer: Data Types

 

Question: _____in Java are complaint with IEEE 754 (an international standard for defining floating point numbers and arithmetic).

a) Real numbers

b) Integers

c) Single character

d) True or False

Answer: Real numbers

 

Question: Integer numbers with b bits_____store signed values in the range of (-2b_1 -1, 2b_1). 

a) Accuracy

b) Precision

c) Exactness

d) Vagueness

Answer: Precision

 

Question: When the Integer numbers are preceded with keyword_____the values are in the range of (0, 2b_1). 

a) Signed

b) Unsigned

c) Boolean

d) Byte

Answer: Unsigned

 

Question: Java uses the Unicode_______set.

a) Numerical

b) IEEE

c) Character

d) None of these

Answer: Character

 

Question: The char type has____bits of precision and is unsigned.

a) 13

b) 14

c) 15

d) 16

Answer: 16

 

Question: Data type_____is not a number, nor can it be treated as one.

a) Char

b) Real

c) Boolean

d) Integer

Answer: Boolean

 

Question: If anything is to be remembered by the computer, there will be a requirement of_____during program execution. It needs to be stored in the memory of the computer.

a) Variables

b) Literals

c) Comments

d) Operators

Answer: Variables

 

Question: ______manipulates the data that is stored in memory.

a) Information

b) Programs

c) Comments

d) Characters

Answer: Programs

 

Question: In machine language, data can only be referred to by giving the______address of the location in memory where it is stored.

a) Numerical

b) Alphanumeric

c) Alphabetical

d) Real

Answer: Numerical

 

Question: In a______language such as Java, names are used instead of numeric address of memory location to refer to data.

a) Low-level

b) Middle-level

c) High-level

d) Top-level

Answer: High-level

 

Question: A name is used to refer to the data stored in memory and it is called a_____

a) Variable

b) Literal

c) Comment

d) Operator

Answer: Variable

 

Question: A_____can take different data values at different times during the execution of the program, but it always refers to the same memory location.

a) Variable

b) Literal

c) Comment

d) Operator

Answer: Variable

 

Question: A______can be used in a Java program only if it has been declared.

a) Variable

b) Literal

c) Comment

d) Operator

Answer: Variable

 

Question: One or more variables can be declared in Java using_____statement.

a) Beginning

b) Initial

c) Declaration

d) Comment

Answer: Declaration

 

Question: In Java, the conventional syntax of_____denote the item to be specified by user.

a) Curly brackets

b) Square brackets

c) Angle brackets

d) Round brackets

Answer: Angle brackets

 

Question: In Java, the conventional syntax of_____denote the list of items separated by commas.

a) Curly brackets

b) Square brackets

c) Angle brackets

d) Round brackets

Answer: Curly brackets

 

Question: In syntax: {variable names}, it denote the list of____names.

a) Variable

b) Literal

c) Comment

d) Operator

Answer: Variable

 

Question: When the list contains more than one item, items should be separated by_____

a) Semi colon

b) Commas

c) Full stop

d) Colon

Answer: Commas

 

Question: In typical Java syntax, the is to be replaced with the keyword denoting the_____of the variables.

a) Data types

b) Variables

c) Literals

d) Comments

Answer: Data types

 

Question: ______is used to determine the size of variable, the values it can hold and the operations that can be performed on it.

a) Real numbers

b) Variables

c) Data Types

d) Floats

Answer: Data Types

 

Question: When the compute executes a variable____statement, it sets aside memory for the variable and associates the variable's name with that memory.

a) Data type

b) Initial

c) Declaration

d) Comment

Answer: Declaration

 

Question: Which of the following examples of variables is correct ?

a) Int marks;

b) Double amount, interest;

c) Float rate;

d) All of these

Answer: All of these

 

Question: Which of the following rule is incorrect while defining a variable name ?

a) It must begin with an alphabet, underscore (_)

b) It must begin with a percentage sign (%)

c) No spaces are allowed in variables

d) It cannot be a reserved word

Answer: It must begin with a percentage sign (%)

 

Question: Which of the following is true ?

a) Java is case-sensitive

b) Java is not case-sensitive

c) Both (A) and (B)

d) None of these

Answer: Java is case-sensitive

MCQs for Java Basics Computer Science Class 12

Expert teachers of studiestoday have referred to NCERT book for Class 12 Computer Science to develop the Computer Science Class 12 MCQs. If you download MCQs with answers for the above chapter you will get higher and better marks in Class 12 test and exams in the current year as you will be able to have stronger understanding of all concepts. Daily Multiple Choice Questions practice of Computer Science will help students to have stronger understanding of all concepts and also make them expert on all critical topics. After solving the questions given in the MCQs which have been developed as per latest books also refer to the NCERT solutions for Class 12 Computer Science. We have also provided lot of MCQ questions for Class 12 Computer Science so that you can solve questions relating to all topics given in each chapter. After solving these you should also refer to Class 12 Computer Science MCQ Test for the same chapter.

Where can I download latest CBSE MCQs for Class 12 Computer Science Java Basics

You can download the CBSE MCQs for Class 12 Computer Science Java Basics for latest session from StudiesToday.com

Are the Class 12 Computer Science Java Basics MCQs available for the latest session

Yes, the MCQs issued by CBSE for Class 12 Computer Science Java Basics have been made available here for latest academic session

Where can I find CBSE Class 12 Computer Science Java Basics MCQs online?

You can find CBSE Class 12 Computer Science Java Basics MCQs on educational websites like studiestoday.com, online tutoring platforms, and in sample question papers provided on this website.

How can I prepare for Java Basics Class 12 MCQs?

To prepare for Java Basics MCQs, refer to the concepts links provided by our teachers and download sample papers for free.

Are there any online resources for CBSE Class 12 Computer Science Java Basics?

Yes, there are many online resources that we have provided on studiestoday.com available such as practice worksheets, question papers, and online tests for learning MCQs for Class 12 Computer Science Java Basics