This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes help 4 abstract class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "help 4 abstract class" Watch "help 4 abstract class" New topic

help 4 abstract class

sachin kumar Kansal

Joined: Mar 25, 2001
Posts: 20
hi to all,
i have just faced a problem, which i think can be solved here !
i have written following code in
// start of code

abstract class stat1
abstract public void method();
abstract class stat2 extends stat1
int f = 20; // these 2 lines says error
public class stat
int a = 10;
static int b = 20;
public static void main (String args[])
int c = args.length;
stat d = new stat();
// end of code
when i am compling it it is giving 2 errors
at line 10
<identifer> expected and
cannot resolve symbol System.out.println
please copy the code and try out at u r system.
thanks in advance
sachin kumar

Thanks,<br />--Sachin Kansal
Samith Nambiar
Ranch Hand

Joined: Mar 14, 2001
Posts: 147
you get a compile time error because the statement
must either be
1. within a method declaration as in
public void display()
2. it must be within a static initializer block as in
hope that helps
harder u try luckier u get
I agree. Here's the link:
subject: help 4 abstract class
jQuery in Action, 3rd edition