1?Which statement converts value in double variable x to a String variable str?
ID: 3919361 • Letter: 1
Question
1?Which statement converts value in double variable x to a String variable str?
str = x.toString();
str = x;
str = Double.toString(x);
str = String.double(x);
2?Which statement converts String variable str containing integer value to int variable n?
n = str;
n = Integer.parseInt(str);
n = new Integer(str);
n = str.toInt();
3?Which statement is incorrect, provided:
Integer n;
int m;
n = m;
m = 77;
n = new Integer ();
m = n;
4?Which statement returns true?
Character.isWhitespace('a')
Character.isLetter('a')
Character.toUpperCase('a')
Character.isUpperCase('a')
5?An interface may have (only one answer):
method definitions
instance variables
method headings
constructors
6?The scanner class has a series of methods that checks to see if there is any more well-formed input of the appropriate type. These methods are called _______ methods
hasNext
nextToken
getNext
testNext
str = x.toString();
str = x;
str = Double.toString(x);
str = String.double(x);
Explanation / Answer
1) str = Double.toString(x);
2) n = Integer.parseInt(str);
4) Character.isUpperCase('a')
5) method headings
6) hasNext
Thanks, PLEASE UPVOTE if helpful
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.