Java problem, HELP
Question 6
The class Lightbulb contains a non-static void method with no...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 03.11.2020 03:20 oscar3231
Java problem, HELP
Question 6
The class Lightbulb contains a non-static void method with no parameters named turnOn. Suppose a Lightbulb object loungeLamp has been declared as follows:
Lightbulb loungeLamp = new Lightbulb();
Which of the following correctly calls the method turnOn?
loungeLamp. turnOn(Lightbulb);
Lightbulb. turnOn();
Lightbulb. turnOn(loungeLamp);
turnOn(loungeLamp);
loungeLamp. turnOn();
Flag this Question
Question 7
Which of the following could be the signature of a constructor from a class named CustomClass?
constructor(double x, double y);
CustomClassConstructor();
CustomClass(int num);
All options could be signatures for constructors for this class
newCustomClass();
Flag this Question
Question 8
What is stored in the variable s after the following code is executed?
int s = Math. sqrt(26);
5
5.0
Error: possible loss of precision
5.09901951359278
6
Flag this Question
Question 9
What is printed by the following code?
String a = "yarn";
String b = a;
a = b. toUpperCase();
System. out. println(a + b);
YARNyarn
Nothing is printed. An error is caused because toUpperCase is a void method.
YARNYARN
yarnyarn
yarnYARN
Flag this Question
Question 10
Which of the following is a call to a static method?
new Double()
a. intValue()
Math. random()
string1.length()
Integer. MAX_VALUE
Question 11
What is printed by the following code segment?
int x = 24601;
System. out. println(x. substring(3, 4));
60
6
01
Nothing is printed, an error occurs.
0
![ansver](/tpl/images/cats/User.png)
Answers: 1
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 06:30
Selective incapacitation is a strategy to reduce prison population
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 18:00
What is the first view you place in your drawing?
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 10:50
Your friend kayla is starting her own business and asks you whether she should set it up as a p2p network or as a client-server network. list three questions you might ask to kayla decide which network to use and how her answers to those questions would affect your recommendation.
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
You know the right answer?
Questions
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 19.11.2020 23:30
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 19.11.2020 23:30
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/biologiya.png)
Biology, 19.11.2020 23:30
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 19.11.2020 23:30
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 19.11.2020 23:30
![question](/tpl/images/cats/istoriya.png)
History, 19.11.2020 23:30
![question](/tpl/images/cats/mat.png)
Mathematics, 19.11.2020 23:30
![question](/tpl/images/cats/istoriya.png)
History, 19.11.2020 23:30
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)