James Lollar

Greenhorn
+ Follow
since Apr 24, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by James Lollar

You might try this (or something like it) to get your data,.
System.out.print("Enter the hours worked:");
BufferedReader B = new BufferedReader(new InputStreamReader(System.in));
String S = B.readLine();
float N = Float.parseFloat(S);
// int would be input by
// int N = Integer.parseInt(S);

JL
19 years ago
How about a for loop, inside a class that takes your table input.. something like (maybe)
import java.io.*;
public class InputHelp{
public String getTheInput(String promptUser){
String userInput = null;
for (integer iv=0;iv<20;iv++){
// prompt user
try {
BufferedRead is new BufferedReader{
//get the line
//test the line for length
} // catch the exception
} // end for
return userInput;
}
}
//the prompt user would hold a System.out.print or prinln, looping for your
input
just a guess
JL
How about a for loop, inside a class that takes your table input.. something like (maybe)
import java.io.*;
public class InputHelp{
public String getTheInput(String promptUser){
String userInput = null;
for (integer iv=0;iv<20;iv++){
// prompt user
try {
BufferedRead is new BufferedReader{
//get the line
//test the line for length
} // catch the exception
} // end for
return userInput;
}
}
//the prompt user would hold a System.out.print or prinln, looping for your
input
just a guess
JL
19 years ago
How about a for loop, inside a class that takes your table input.. something like (maybe)
import java.io.*;
public class InputHelp{
public String getTheInput(String promptUser){
String userInput = null;
for (integer iv=0;iv<20;iv++){
// prompt user
try {
BufferedRead is new BufferedReader{
//get the line
//test the line for length
} // catch the exception
} // end for
return userInput;
}
}
//the prompt user would hold a System.out.print or prinln, looping for your
input
just a guess
JL
19 years ago