Search:

Type: Posts; User: thegorila78

Search: Search took 0.18 seconds.

  1. Re: Trouble inputting values into a 2-dimensional array

    You have been a real help man. I have one final problem with the toString method. I have no idea what to put in the return statement. When I input i and j, it says they cannot be resolved to a...
  2. Re: Trouble inputting values into a 2-dimensional array

    Ok I made the changes you said I should accept now I'm getting a different error in the method header of locateLargest which is :The method getMax(int[][]) in the type Location is not applicable for...
  3. Re: Trouble inputting values into a 2-dimensional array

    Thanks for the reply. My updated code is:


    import java.util.Scanner;

    public class LocationTest {

    public static void main(String[] args) {
    Scanner numberInput = new Scanner(System.in);...
  4. Re: Trouble inputting values into a 2-dimensional array

    I think I get what you're saying but I'm still kinda lost. So, if I make a new class just for Location, should I keep both the constructors in the old class or put them in the new one? Also, which...
  5. Re: Trouble inputting values into a 2-dimensional array

    Alright my updated code is:


    import java.util.Arrays;
    import java.util.Scanner;
    public class Location {
    private int row;
    private int column;
    private int[][] array;
    public static void...
  6. Re: Trouble inputting values into a 2-dimensional array

    Thanks for the reply man I understand what I did wrong now and fixed it. I also have another question though. Another part of my assignment is to find the coordinates of the max value or locate...
  7. Trouble inputting values into a 2-dimensional array

    Hey guys I'm trying to input values into a 2 dimensional array in a program I am doing for school. My code is as follows:


    import java.util.Arrays;
    import java.util.Scanner;
    public class...
  8. Replies
    1
    Views
    1,027

    type mismatch problem

    Here is a problem im working on for my intro to java class:
    1.Design a class named Location for locating a maximal value and its location in a twodimensional
    array. The class contains:
    2.Private...
  9. Re: Cannot call method because it is non-static

    ok thanks a lot for the help man I appreciate it.
  10. Re: Cannot call method because it is non-static

    First off I'd like to say thanks for the reply. I came to my senses about what you just posted before you posted it so I fixed that problem but now I have another one. In my assignment I have...
  11. Cannot call method because it is non-static

    I'm writing a program for my java class that has to solve quadratic equations. I have separate methods that calls the private variables a, b, and c. I also have separate methods for the...
  12. Replies
    2
    Views
    885

    Re: Sum not returning correctly

    Thanks man I can't believe I didn't think of that.
  13. Replies
    2
    Views
    885

    Sum not returning correctly

    There's this program I have to write for school:
    Craps is a popular dice game played in casinos. Write a program to play a
    variation of the game, as follows:
    Roll two dice. Each die has six faces...
  14. Replies
    3
    Views
    1,410

    Re: Trouble with detecting digits

    I imported the java.util.Random and then I created a random object called myGenerator. When I try to declare my random number as a String I get an error:
    Error: cannot find symbol
    symbol: ...
  15. Replies
    3
    Views
    1,410

    Trouble with detecting digits

    Here is the question assigned to me in class...

    Suppose you want to develop a program to play lottery. The program randomly
    generates a lottery of a two-digit number, prompts the user to enter a...
Results 1 to 15 of 15