Programming - Strings

You Are Here :: Home > JAVA > Strings - General Questions

 
1.

The Java platform provides the __________ class to create and manipulate strings.                        


A. Character B. String
C. integer D. float




2.

The String class has thirteen constructors that allow you to provide the initial value of the string using different sources, such as an _________.                        


A. arrays B. characters
C. array of characters D. strings




3.

The String class is immutable.                        


A. immutable B. mutable
C. both a and b D. all the above




4.

Methods used to obtain information about an object are known as __________________.                        


A. methods B. accessor methods
C. both a and b D. none




5.

One accessor method that you can use with strings is the ___________ method.                        


A. strcpy() B. strcmp()
C. length() D. all the above




6.

The String class includes a method for concatenating two strings:                        


A. string1.concat(string2); B. string1.copy(string2);
C. both a and b D. none




1

2

3

4

next »

 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on