Programming - Strings

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

 
13.

The Number subclasses that wrap primitive numeric types ( Byte, Integer, Double, Float, Long, and Short) each provide a class method named valueOf that converts a string to an ___ of that type.                        


A. object B. class
C. method D. package




14.

You can get the character at a particular index within a string by invoking the _______-accessor method.                        


A. length() B. charAt()
C. strlen() D. strcpy()




15.

The index of the first character is _________.                        


A. one B. two
C. zero D. more than zero




16.

the index of the last character is length()__________.                        


A. 1 B. 2
C. 0 D. -1




17.

_________returns a copy of this stringwith leading and trailing white space removed.                        


A. String trim() B. string concat()
C. string copy() D. all the above




18.

CharSequence is an _______ that is implemented by the String class.                        


A. package B. interface
C. both a and b D. none




« prev

1

2

3

4

next »

 
 



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