Monday, 19 March 2012

Internet, Web Programming and Java MCQ 08

1.      String is an________

a.       Class
b.      Object
c.       Variable
d.      Array

2.      String created by using______

a.      String buffer
b.      String
c.       String class
d.      None of these

3.      String class is more commonly used to display

a.       Character
b.      Text
c.       Messages
d.      Object

4.      The syntax to declare a string is as follow:

a.      String string_name;
b.      String string name
c.       String string class;
d.      String String_class

e.       ;
5.      It refers to an object in java, which has a sequence of characters.

a.       Array
b.      String
c.       Vector
d.       None of these

6.      The initial capacity of a default vector is __________.

a.       17
b.      12
c.       10
d.      20 

7.      String are always specified in

a.       Braces
b.      Double quotes
c.       Single quotes
d.      Square brackets ([]) 

8.      The _______class contains methods to store any number and any type of objects in a single  unit called vectors

a.       Array
b.      Vector
c.       String
d.      Wrapper

9.      The ___________classes are used to convert primitives data type into objects before storing them in the vectors

a.       String
b.      Wrapper
c.       Array
d.      Vector

10.  Array are defined as a ___size sequence of the same type of data elements

a.      Fixed
b.      Dynamic
c.       Static
d.      None

11.  The wrapper classes are used to convert ________data types into their respective class instances

a.      Primitive
b.      Non-primitive
c.       Both a & b
d.      None

12.  Vector is a dynamic array which can accommodate:

a.       Any number
b.      Type of objects
c.       Both a & b
d.      None of these

13.  The new class acquires those members of the old class that are already__________ and___________

a.       Trace & debug
b.      Tested & debugged
c.       Tested & trace
d.      None of these

14.  In java different data types like_________

a.       Array
b.      String
c.       Vector
d.      All of these

15.   Data types are capable of grouping related data together into a_______

a.      Single unit
b.      Multiple unit
c.       Double unit
d.      None of these

16.  Java provide a different kind of data type known as______

a.      Array
b.      String
c.       Vector
d.      None of these

17.  Array can be of _________ type:

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

18.  Array can either single dimensional or multi dimensional depending upon the number of _________ used:

a.       Superscripts
b.      Subscript
c.       Both a & b
d.      None of these

19.  All the elements created using the new operator in the array will be automatically to:

a.      Zero
b.      Null
c.       Default
d.      None of these

20.  Every elements in an array is associated with a unique subscript value starting from:

a.       0 to size
b.      0 to size +1
c.       o to size -1
d.      None of these

21.  Index of an array starts with:

a.      Zero
b.      One
c.       Default
d.      None of these

22.  The memory location where the first element of an array is stored is known as the:

a.      Base address
b.      Sub address
c.       Derived address
d.      None of these 

23.  Initialization of two dimensional array:

a.      Increase the readability
b.      Decrease the readability
c.       Increase the maintainability
d.      Decrease the maintainability

24.  Operation performed on a dimensional array include finding the:

a.       Seem of row element
b.      Column element & diagonal element
c.       Finding the max & min values
d.      All of these

25.   String class is more commonly used to

a.      Display errors
b.      Display messages
c.       Display programs
d.      None of these

26.   String created using string buffer class are of:

a.      Varying length
b.      Fixed length
c.       Both a & b
d.      None of these

27.  The vector class contained in the ________ package:

a.      Java.util
b.      Java,util
c.       Java.’util’
d.      None of these

28.  Java.util package defines methods to store object into a________

a.      Single unit
b.      Double unit
c.       Multiple unit
d.      None of these

29.  Java provides wrapper classes contained in the__________ package:

a.       Java,lang
b.      Java.lang
c.       Java.lang;
d.      None of these

30.  Each element of the array is itself an array is_________

a.      Multi-dimensional array
b.      Single-dimensional array
c.       Arrays 
d. None of these

1 comment :

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training in India . Nowadays Java has tons of job opportunities on various vertical industry.