About Question enthuware.ocajp.i.v7.2.1166 :
Posted: Mon Nov 25, 2013 5:55 pm
Which line of code will not be acceptable to the compiler?
public class XBox{
volatile int root = 20; //1
private XBox() //2
{
volatile int i = 30; //3
}
private void XBox() //4
{
int local = 30;
}
}
What does the explanation "Only member variable can be volatile or transient." with the correct answer (3)?
public class XBox{
volatile int root = 20; //1
private XBox() //2
{
volatile int i = 30; //3
}
private void XBox() //4
{
int local = 30;
}
}
What does the explanation "Only member variable can be volatile or transient." with the correct answer (3)?