ok so i think i should use input.close(); but i cant figure out where to put it. I tried the line after scanner input as well as the line after the println neither worked any suggestions?
Type: Posts; User: iamgonge
ok so i think i should use input.close(); but i cant figure out where to put it. I tried the line after scanner input as well as the line after the println neither worked any suggestions?
import java.util.Scanner;
public class LargerNum {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter two values: ");
double...
hah! thanks Norm for pointing that out, looks like I was closer than I thought! so here is final code please check:
import java.util.Scanner;
public class LargerNum {
public static void...
at the end of the else statement I have return Large which is the larger of the two numbers. So the return Large; line should send the value back to the main method right? so how do i use the value...
import java.util.Scanner;
public class LargerNum {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter two values: ");
double...
the problem is as follows:
Create a main class file. (1) Inside create a method max() that has two floating point
parameters x and y and returns the larger of x and y; (2) In the main method,...