Originally posted by Alex Turcot:
I guess you could use a label, declared just before your 3 loops, and break out of the label.
Which of the following java classes are immutable??
Uhm... I would say B and C.
Which of the follwing is true about static modifier.
A. static can be applied to : instance variables, methods,
code Segments and classes.
B. a static method cannot be overridden.
C. inner classes can be both static & private.
D. a static reference cannot be made through non static
method or code block.
E. abstract & static both can be applied together to a
I would say A, B, C.
If a class declares a static method, then the declaration of that method is said to hide any and all methods with the same signature in the superclasses and superinterfaces of the class that would otherwise be accessible to code in the class. A compile-time error occurs if a static method hides an instance method.
Originally posted by Parameswaran Thangavel:
can i say in nutshell
The static reference can't be created or declared in static method,static block and non-static method,non-static block.
But it can be used at anywhere by simply using its reference variable..
Continue label;---> will go for the next iteration of the loop placed under the label;
break label;------> will just get the control out of the loop placed under the label;
is it ok...