Search:

Type: Posts; User: iamgonge

Search: Search took 0.07 seconds.

  1. Replies
    11
    Views
    1,185

    Re: Check for larger num problem

    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?
  2. Replies
    11
    Views
    1,185

    Re: Check for larger num problem

    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...
  3. Replies
    11
    Views
    1,185

    Re: Check for larger num problem

    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...
  4. Replies
    11
    Views
    1,185

    Re: Check for larger num problem

    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...
  5. Replies
    11
    Views
    1,185

    Re: Check for larger num problem

    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...
  6. Replies
    11
    Views
    1,185

    Check for larger num problem

    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,...
Results 1 to 6 of 6