Home »
MCQs »
Java MCQs
Which syntax is valid to create a vector in java?
49. Which syntax is valid to create a vector in java?
- Vector < string > names = new Vector < String > ();
- Vector name = new string;
- int name = new vector ()
- All of these
Answer: A) Vector < string > names = new Vector < String > ();
Explanation:
The hex2bin() function is used to convert hexadecimal values to the ASCII characters.
The syntax to create a vector in Java is:
Vector < string > names = new Vector < String > ();