Monday 19 March 2012

Internet, Web Programming and Java MCQ 04


  1. Unicode is a ____________ character code set

a.       16-bit
b.      32-bit
c.       64-bit
d.      8-bit

  1. Many languages can be represented using the standard ___________ character set(ascii characters)

a.       16-bit
b.      8-bit
c.       32-bit
d.      64-bit

  1. A token is defined as the

a.       Smallest unit of a machine
b.      Largest unit of a machine
c.       Smallest unit of a program
d.      None of these

  1. Java tokens are classified into

a.       Keywords, identifiers
b.      Constants, operators
c.       Punctuators
d.      All of these

  1. The keywords ____________ and _____________ are reserved words and are not used

a.       Const & goto
b.      Const & goin
c.       Const & out
d.      None of these

  1. Identifiers are the names given to uniquely identify various programming languages elements _______________

a.       Variables
b.      Arrays
c.       Packages
d.      All of these

  1. _______________ characters can be used in an identifier

a.       Alphabets
b.      Digits
c.       Underscore & dollar sign
d.      All of these

  1. Constants are also known as

a.       Literals
b.      Numeric
c.       Character
d.      None of these

  1. An identifier must not start with a ____________

a.       Alphabet
b.      Digit
c.       Dollar sign
d.      Underscore

  1. An identifier must not contain other characters such as_________________

a.       ‘*’ & ‘;’
b.      ‘:’ & ‘*’
c.       ‘,’ & ‘.’
d.      ‘.’ & ‘*’

  1. Java constants are classified into _________ categories

a.       1
b.      2
c.       3
d.      4

  1. The use of special characters like___________________ are not permitted in numeric constants

a.       ‘,’
b.      ‘;’
c.       ‘?’
d.      All of these

  1. Character constants can represent either the ______________-

a.       Printable characters
b.      Non-printable characters
c.       Both a & b
d.      None of these

  1. __________________refers to a single character enclosed in single quotes(‘’)

a.       Character constants
b.      Numeric constants
c.       String constants
d.      Boolean constants

  1. _____________refers to sequence of any number of characters enclosed in the double quotes (“”)

a.       Character constants
b.      Numeric constants
c.       String constants
d.      Boolean constants

  1. Operators are the symbols which perform operations such as

a.       Addition
b.      Subtraction
c.       Multiplication
d.      All of these

  1. Punctuators also known as

a.       Equal
b.      Separators
c.       Operands
d.      None of these

  1. The structure of a program by dividing and arranging a set of codes

a.       Punctuators
b.      Operators
c.       Operands
d.      None of these

  1. ___________ refers to a character preceded by the backslash character

a.       Escape sequences
b.      Single quote
c.       Tab sequences
d.      Space sequences

  1. Documentation section are used to

a.       Increase it readability
b.      Describe its functionality
c.       Both a & b
d.      None of these

  1. Package statements is the ___________statement in a java program

a.       First
b.      Second
c.       Third
d.      Fourth

  1.  ____________ allows us to access a class which belongs to some other package

a.       Package statement
b.      Import statement
c.       Interface statement
d.      None of these


  1. _____________ is a way of implementing multiple inheritance in java

a.       Package statement
b.      Interface statement
c.       Import statement
d.      None of these

  1. A program may consist of any number of _______________

a.       Class definitions
b.      Object definitions
c.       Package statement
d.      Interface statement

  1. Main method is the ______________ point of program

a.       Ending
b.      Starting
c.       Central
d.      None

  1. Inside the main method class, the object of several classes can be

a.       Created
b.      Accessed
c.       Manipulated
d.      All of these

  1. A data type determines the

a.       Type
b.      Operations performed on data
c.       Both a & b
d.      None of these

  1. Data types are divided into _________ parts

a.       1
b.      2
c.       3
d.      4

  1. The names of two data types
a.       Primitive and non-primitive data type
b.      Printable and non-printable data type
c.       Structured and non-structured data type
d.      None of these
  1. Primitive data types also known as

a.       Built in data types
b.      User defined data types
c.       Well defined data types
d.      None of these

  1. Float type represents a

a.       Single-precision number
b.      Double-precision number
c.       Multiple-precision number
d.      None of these

  1. Double type represents a ___________ number

a.       Single-precision number
b.      Double-precision number
c.       Multiple-precision number
d.      None of these

  1. Character data type is used to store a ___________ character enclosed in _______________ quotes

a.       Single & single
b.      Single & double
c.       Double & single
d.      Double & double

  1. Character type occupies ____________ of memory

a.       8-bits
b.      16-bits
c.       32-bits
d.      64-bits

  1. The range of the character data type is ____________

a.       0 to 65536
b.      0 to 65537
c.       0 to 65538
d.      0 to 65534

  1. The default value of the character data type is the ___________ null character

a.       Single
b.      Double
c.       Null
d.      None of these

  1. The default value of boolean data type is ________
a.       True
b.      False
c.       garbage
d.      None of these
  1. Java supports __________ floating point data types

a.       1
b.      2
c.       3
d.      4

  1. The name of two floating point data types

a.       Float, double
b.      Float, void
c.       Double, void
d.      None of these

  1. Non-primitive data types also known as ___________

a.       Well defined data type
b.      User defined data type
c.       Built in defined data type
d.      None of these

  1. Non-primitive data type includes

a.       Classes
b.      Interfaces
c.       Arrays
d.      All of these

  1. A variable is an

a.       Identifier
b.      Represents memory location
c.       Store data value
d.      All of these

  1. The value of a variable can ______________ anytime during the program execution

a.       Be changed
b.      Not be changed
c.       Be either changed or not
d.      None of these

  1. Variables must be declared in a program __________  they are used

a.       Before
b.      After
c.       At a time
d.      None of these

  1. Variables can be classified into _________ types of variables

a.       1
b.      2
c.       3
d.      4

  1. The declaration of a variable informs the

a.       Compiler
b.      Allocates sufficient memory
c.       Both a & b
d.      None of these

  1. Initialization of variables at run time is known as

a.       Dynamic initialization
b.      Static initialization
c.       Demonstrate initialization
d.      None of these

  1. Variables can be also be given values interactive through the keyboard using the ___________ method

a.       Writeline()
b.      Readline()
c.       Learnline()
d.      None of these

  1. To handle the error that may occur while reading data from the keyboard _________ statements are to be used

a.       Try & catch
b.      Try & caught
c.       Try & copy
d.      None of these

  1. _________________ are the fundamental data types provided by programming language

a.       Primitive data type
b.      Non-primitive data type
c.       Printable data type
d.      Non-primitive data type

  1. Java supports ________ types of integers

a.       1
b.      2
c.       3
d.      4

  1. The two special operators provided by java are __________

a.       Instanceof and dot(.)
b.      Instanceof and comma(,)
c.       Instanceof and double quote(“ “)
d.      None of these

No comments :

Post a Comment