File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Programmer Certification (SCJP/OCPJP)
Joined: Oct 04, 2000
Nov 23, 2000 13:07:00
Khalid's book said return; can exist in initializers(P149).But when I compile the following code,the compiler complains
public class MQ7
public static void main(
MQ7 tf = new MQ7();
Did I miss something?
Joined: Oct 18, 2000
Nov 23, 2000 14:05:00
In the errata for Khalid, the workds 'and initializer' have been removed. So you are right, you can't use it in initializers.
Joined: Nov 16, 2000
Nov 23, 2000 14:08:00
Yes u did, u cannot do this kind of operation within the body of class itself, it has to b within a method, constructor or a
main body for ot to work...
I agree. Here's the link:
subject: return statement
IllegalMonitorStateException (not what you think)
Using "this" Operator and it's relation to readability
Habibi book: How many instances of remote object and Data object exist ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014