text: how do i combine this two seperate java class into one functional class? import java.io.*; public class mainclass{   public static void main(string args[]) throws ioexception{ inputstreamreader stdin = new inputstreamreader(system.in); bufferedreader console =new bufferedreader(stdin); int int_value; string s1; int flag=0; int_value=10; while (flag==0){ system.out.println("enter the actual temperature and hit enter:"); s1 = console.readline(); int_value = integer.parseint(s1); if (int_value>=-15 && int_value<=200){ flag=1; } else if (int_value200){ system.out.println("error value too big&#92;n");   }  }  activities process=new activities(); process.printallowedactivities(int_value); //process.listvalues();  }  ============================   import java.io.*;  class exercise extends activities{  private int lowtemp;  private int hightemp; private string name;  public void setlowtemp( int lowt) { lowtemp = lowt; }  public int getlowtemp() { return  lowtemp; } your class which contains the main method must extend the "activities" and than copy all the content form the secont one to the first one and this should do it... althow i don;t understand why to you want to combine them... the mainclass should have small functionalities and i think they are better as described here...(in 2 separated classes)... but again your call..:d