nachy4863 nachy4863
  • 07-06-2018
  • Computers and Technology
contestada

In a java class, variables can be present both inside and outside of methods. question 9 options:
a. True
b. False

Respuesta :

IsrarAwan
IsrarAwan IsrarAwan
  • 17-06-2018
The correct answer is: True

Explanation:

Consider the following program:
class Main {
int a = 10;
public static void main(String[] args) {
add();
}

private static void add() {
int b = a+20;
System.out.println(b);
}
}


The output of the above program is 30. As you can see the variable a is declared outside the method, whereas variable b is declared inside the method.
Answer Link

Otras preguntas

Sully is riding a snowmobile on a flat, snow-covered surface with a constant velocity of 10 meters/second. The total mass of the snowmobile, including Sully, is
Please help !! Answer correct for a brainliest and also a thanks ! Don't answer if you don't know it .
Which empires tried to control iran and afghanistan in the 1800s? a. french and german c. spanish and egyptian b. british and russian d. italian and russian
Marissa was decorating her room. She arranged 63 picture tiles on a wall in the shape of a rectangle. How many rows of tiles could be on the wall?
in the 19th century john D. rockefeller was most associated with what company
(x+1)(x+8)its multiply
solving equations using algebra
Atoms have no electric charge because they
What is the correct answer? Original: Morgan explained to his roommate Richard that he needed to work overtime if he was going to have enough money to pay this
40 is 50% of what number
good job