✏️ Explanatory Question
State the method that:
- Converts a string to a primitive float data type.
- Determines if the specified character is an uppercase character.
State the method that:
Here are the methods for the specified tasks:
Converts a string to a primitive float data type:
Float.parseFloat(String s)String to a primitive float. For example
String str = "3.14";
float f = Float.parseFloat(str); // f will be 3.14f
Determines if the specified character is an uppercase character:
Character.isUpperCase(char ch)
char ch = 'A';
boolean isUpperCase = Character.isUpperCase(ch); // isUpperCase will be true