1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lubov Fominskaja [6]
3 years ago
15

Can a non-void method use the keyword return without returning a value? Explain your answer.

Computers and Technology
1 answer:
max2010maxim [7]3 years ago
6 0

Answer:

False. A non void method must return something.

Explanation:

No, a non-void method has return statement in it and it returns a value based on the return type in the method declaration and the implementation of that method. Every non - void method has to return a value depending on its declaration. A non void method should have a return statement in it. As it is a non - void method and has return statement in it, it returns a value based on the implementation of that method. If a void method contains return statement in it, the method exits.

You might be interested in
Question 4 (Worth 5 points)
Nikitich [7]

Answer:

int()

Explanation:

int() is just a regular number

float() has a decimal

print() displays something in the output

string() is usually text

5 0
3 years ago
Read 2 more answers
Key Categories: more libraries and thousands of functions
Vadim26 [7]

Answer:

2b2t

Explanation:

2b2t

6 0
4 years ago
Windows uses a memory-management technique known as ________ to monitor which applications you frequently use and preloads them
ad-work [718]
Windows uses a memory-management technique known as SuperFetch to monitor which applications you frequently use and preloads them into your system memory.
This technique is designed to speed up app launching by preloading certain apps based on the usage patterns of the user.

4 0
3 years ago
Write the code for the method getNewBox. The method getNewBox will return a GiftBox that has dimensions that are m times the dim
liraira [26]

Answer:

public class GiftBox{

private int length;

private int width;

private int height;

 

public GiftBox(double length, double width, double height) {

this.length = length;

this.width = width;

this.height = height;

}

 

public static GiftBox getNewBox(GiftBox giftBox, double m) {

return new GiftBox(m * giftBox.length, m * giftBox.width, m * giftBox.height);

}

 

private boolean fitsInside(GiftBox giftBox) {

if(giftBox.length < this.length && giftBox.width <this.width

&& giftBox.height < this.height) {

return true;

}

return false;

}

 

public static void main(String []args){

GiftBox giftBox = new GiftBox(3.0 , 4.0, 5.0);

GiftBox newGiftBox = getNewBox(giftBox, 0.5);

System.out.println("New Box length: " + newGiftBox.length);

System.out.println("New Box width: " + newGiftBox.width);

System.out.println("New Box height: " + newGiftBox.height);

 

GiftBox gift = new GiftBox(3.0 , 4.0, 5.0);

GiftBox other = new GiftBox(2.1 , 3.2, 4.3);

GiftBox yetAnother = new GiftBox(2.0 , 5.0, 4.0);

 

System.out.println(gift.fitsInside(other));

System.out.println(gift.fitsInside(yetAnother));

}

}

Explanation:

The getNewBox is a public method in the GiftBox class in the Java source code above. It returns the GiftBox object instance increasing or multiplying the dimensions by the value of m of type double.

3 0
3 years ago
Describe how computer is in the last 35 years
lesantik [10]
Earlier there were no ic's but vacuum tubes or  transisters,..
making computer big , so big in that time, with low speed and  memory
4 0
4 years ago
Other questions:
  • Instructions:Select the correct answer.
    8·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    9·1 answer
  • if an open cut or wound is exposed to contamination washing it in hot water and hand soap is not sufficient to keep safe
    14·2 answers
  • Which of the following blocks allows a user to enter text in a text box in App Inventor?
    6·1 answer
  • Which of the following protects intellectual property?copyright
    9·2 answers
  • when you enter a formula in a cell the result of the calculation displays in a cell. how do views of formula after entering it?
    9·2 answers
  • It is for employees to make mistakes that compromise the security of an organization’s computer devices and sensitive informatio
    10·2 answers
  • 8.10 Code Practice Question 3
    6·1 answer
  • Bộ mã I mã hóa được nhiêu kí tự
    12·1 answer
  • Decrypt this secret message if your able to a lot will come..
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!