Answering the question in your comment, there are two things that you can do:
1.Call the methods at the end of your constructor. When the methods are called, the program statements contained in them will execute.
public Weather(int date) throws FileNotFoundException, IOException
{
// code here
lowest(/*char array variable goes here*/);
highest(/*char array variable goes here*/);
// etc.
}
public static void main(String[] args)
{
new Weather(/*int value goes here*/);
}
2.Make your variables global so that they can be accessed by all methods in the class.
public class Weather
{
private char[] cLow;
private char[] cHigh;
public Weather(int date) throws FileNotFoundException, IOException
{
// code here
cLow = new char[(int)dateLow.length()];
cHigh = new char[(int)dateHigh.length()];
// code here
}
public static void main(String[] args)
{
Weather weather = new Weather(/*int value goes here*/);
weather.lowest(/*char array variable goes here*/);
weather.highest(/*char array variable goes here*/);
// etc.
}
}
solved Having problems creating main method [closed]