logo

Crowdly

Browser

Add to Chrome

Questions Bank (1544372 total)

Which of the following is not true about the Math class?

❌
❌
❌
❌
✅
View this question

Given the following String variable initialization:

String days = "     Monday,Tuesday,Wednesday,Thursday,Friday     ";

Select the line of code that correctly uses this String to generate an array that has each weekday name stored at a separate index.

0%
0%
0%
0%
View this question

Which of the following is not true about the StringBuffer class?

✅
❌
❌
❌
❌
View this question

What does the following line of code generate?

int random = (int)(Math.random() * 11 + 10);

❌
❌
✅
❌
View this question

A Java package is…

❌
❌
❌
✅
View this question

What will the following code fragment output?

String testString = "hello world";

StringBuffer testBuffer = new StringBuffer();

testBuffer.append(testString);

testBuffer.replace(0, testBuffer.length(), testBuffer.toString().toUpperCase());

testString.toUpperCase();

System.out.println(testString + " " + testBuffer);

❌
❌
✅
❌
View this question

What does the following code do?

if (myString.charAt(0) == myString.charAt(myString.length() - 1))

{

System.out.println(myString.substring(1, myString.length() - 1));

}

0%
0%
0%
0%
View this question

When using the term interface in the context of Java class documentation, which of the following statements is not true?

❌
❌
❌
❌
✅
View this question

Assuming r has been defined as a double variable representing the radius of a circle, which of the following Java expressions would most accurately compute the circle area?

❌
✅
❌
❌
View this question

Which of the following is not a valid tag when using javadoc to generate class documentation?

✅
❌
❌
❌
❌
View this question