Which of the following reference data types is used for storing a single character?
- Character
- Integer
- String
- char
The reference data type Character is used for storing a single character in Java. It is different from the primitive data type char, which also stores a single character but is not a reference data type. String is used to store sequences of characters, and Integer is for integer values.
Loading...
Related Quiz
- What is the purpose of the finally block in Java exception handling?
- ________ is an interface in JDBC, which can be used to move a cursor in the result set in both directions.
- How would you handle a situation where a task submitted to ExecutorService is stuck or running for too long?
- The ________ method of the String class returns the index within this string of the first occurrence of the specified character, starting the search at the specified index.
- How can SQL Injection be prevented when executing queries using JDBC?