English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

public class Activities extends Exercise{

public static void main(String[] args) throws IOException {

it says innner class cannot have static declaration

2006-11-16 01:53:30 · 1 answers · asked by Anonymous in Computers & Internet Programming & Design

public class Exercise {
private int lowtemp;
private int hightemp;
private String name;

{
lowtemp = lowt;
}

public int getlowtemp()
{
return lowtemp;
}


public void displayMessage()
{
System.out.println("Please enter the temperature"+ getlowtemp()));
}


public void sethightemp( int hight)
{
hightemp = hight;
}

public int gethightemp()
{
return hightemp;
}


public void displayMessage()
{
System.out.println("Please enter the temperature"+ gethightemp()));
}



public void setname( String n)
{
name = n;
}

public String getname()
{
return name;
}


public void displayMessage()
{
System.out.println("Please enter the temperature"+ getlowtemp()));
System.out.println("Please enter the temperature"+ gethightemp()));
System.out.println("Please enter the temperature"+ getname()));

}

public class Activities extends Exercise{


public static void main(String[] args) throws IOException {


BufferedReader input=new BufferedReader (new InputStreamReader(S

2006-11-17 13:45:15 · update #1

1 answers

You need to post the rest of the code

2006-11-17 04:07:01 · answer #1 · answered by vincentgl 5 · 0 0

fedest.com, questions and answers