Okay so i'm trying to convert a couple things.
So i have already converted my Scanner to a String, now what I want to do is, take the value that they input and use it as an integer for a couple else if statements. IT WONT WORK!
Here is my code so far:
import java.util.Scanner;
public class apples {
public static void main(String args[]) {
Scanner fname = new Scanner(System.in);
Scanner sname = new Scanner(System.in);
Scanner number = new Scanner(System.in);
tuna weight = new tuna();
System.out.println("Enter Your First Name: ");
String fname1 = fname.nextLine();
String fnames = fname1;
System.out.println("Enter Your Last Name: ");
String sname1 = sname.nextLine();
String snames = sname1;
System.out.println("Enter Your Weight (Lbs.) : ");
String num = number.nextLine();
String num1 = num;
System.out.println("Okay " + fname1 + " " + sname1
+ " I can see here that you weigh " + num + "lbs.");
int num2 = num1.parseInt();
if (num1 >= 275)
System.out
.println("You know, you should maybe consider laying off the candy my friend.....");
}
}