Originally posted by Alex Turcot:
Hi,
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??
A. java.lang.Math
B. java.util.String
C. java.util.StringBuffer
D. java.lang.Boolean
E. java.lang.Object
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
method.
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.
SCJA 1.0 (98%), SCJP 1.4 (98%)
SCJA 1.0 (98%), SCJP 1.4 (98%)
Originally posted by Parameswaran Thangavel:
hi all
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..
ANd
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...
SCJA 1.0 (98%), SCJP 1.4 (98%)
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |