For example, one part task is: three methods that set value, unit (C or F) or value and unit
My code would be:
void setValue (float V) {
Value = V;
}
Type: Posts; User: hiro
For example, one part task is: three methods that set value, unit (C or F) or value and unit
My code would be:
void setValue (float V) {
Value = V;
}
For my class I need 4 constructors, one for every object variable (set value to 0 and unit to Celsius), one with 2 parameters for the 2 objectvariables and one without arguments, whereas 0 degreeC is...
Thank you for you patience I finally have it!
static void readArray(String fileName) throws FileNotFoundException {
Scanner s = new Scanner(new File(fileName));
ArrayList<Integer> ArrayInt = new ArrayList<Integer>();
while(s.hasNext())...
while(s.hasNext())
{
if(s.hasNextInt())
ArrayInt.add(s.nextInt());
else
s.hasNext(); // from here on restart the loop?
}
Out.println(ArrayInt);
Hello, I am not sure how to read Integer values from a textfile that has "strings" and "ints" . I want to save strings in an array and int in an array so I can use them later on.
For example, ask...