Question: n the Java code below, what type of variable is z ? _ _ _ _ _ _ _ _ _ _ _ _ _

n the Java code below, what type of variable is z?
_____________________________________
public class MyTestClass {
int x =3;
int y =8;
private void DoSomethingMethodOne(int apple)
{
int z =10;
x = x +14;
System.out.println(x);
System.out.println(y);
DoSomethingMethodtwo(x);
}// DoSomethingMethodOne
public MyTestClass ()
{
x =2;
System.out.println(x);
System.out.println(y);
DoSomethingMethodOne(10);
}// MyTestClass method
public static void main(String[] args){
// TODO Auto-generated method stub
int x =5;
System.out.println(x);
MyTestClass example = new MyTestClass();
}// main
}// MyTestClass
Group of answer choices
A local variable
An instance variable
a floating point number
A parameter

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!