Search:

Type: Posts; User: camel-man

Page 1 of 18 1 2 3 4

Search: Search took 0.64 seconds.

  1. Re: how to get non static variable to static value

    I guess what you should ask yourself is, "why do I want these variables Static?"

    Static refers to the class itself, not an instance of the class. Think if what you are trying to do is logical or...
  2. Re: how to get non static variable to static value

    What error are you getting? You need to call code in a valid thread, like main.
  3. Re: I am unsure why my code produces exceptions during runtime in calculator program

    check line 110 and make sure that the string you are manipulating is not empty/null
  4. Replies
    8
    Views
    208

    [SOLVED] Re: java.lang.NullPointerException

    You need to allocate space for numberGenerator if it is an object, other wise you are calling a method on an object with no address to point to.

    Better yet you need to explicitly set the data type...
  5. Replies
    2
    Views
    164

    Re: int not working?

    your variable names can not start with a number. You need to rename them.

    You also want to look into data types, int cannot be a list of characters.
  6. Re: How to find the needed info from Java API documentation

    you can use system.out.print()
  7. Re: IOexception expected error action listener method

    I suggest breaking this up into multiple methods, you shouldn't have your fileIO in an action listener
  8. Replies
    2
    Views
    176

    Re: Tic Tac Toe Game Issue

    Look into Random class.

    Random rand = new Random();

    int n = rand.nextInt(50) + 1;
    //50 is the maximum and the 1 is our minimum
  9. Re: Help with Bin to Hex and Hex to Ascii program

    Where did getBytes come from?

    I think you should write down a generic flow of your main program in order to get the logic down first

    something like

    get user input for binary
    change binary...
  10. Replies
    6
    Views
    170

    Re: Sphere Java Assignment

    you are forgetting the () at the end of your method call
  11. Re: Help with Bin to Hex and Hex to Ascii program

    Because look at your methods, you are passing in parameters, you need to match your method signatures in order to use them.

    If you have a method like this

    public void setNum(int aNum){...
  12. Replies
    6
    Views
    170

    Re: Sphere Java Assignment

    isn't that what your volume method is for? You can call the volume method on your sphere one and sphere 2, returning the values into seperate variables then comparing that way.
  13. Re: Help with Bin to Hex and Hex to Ascii program

    there is no such thing as a standard method. All methods are the same, they behave the way you code them to. A mutator method is something that changes a value, where as an accessor method is a...
  14. Replies
    6
    Views
    170

    Re: Sphere Java Assignment

    You can start by getting user input, 2 variables for sphere 1 radius and sphere2 radius. Then have an if else statement that compares those 2 values to see which one is bigger. Try to break down your...
  15. Re: Help with Bin to Hex and Hex to Ascii program

    Seems to me that you should know, you already have those methods created. You just have them named set instead of get.
  16. Re: Help with Bin to Hex and Hex to Ascii program

    You didnt write this code did you lol
  17. Re: Help with Bin to Hex and Hex to Ascii program

    You don't have a getbinaryToDecimal() method, you have a setbinaryToDecimal()

    you need to make those methods
  18. Re: Help with Bin to Hex and Hex to Ascii program

    public BintoDectoHextoAsciiClass(String hexvalue,String outputvalue,int decimalvalue, String hexStringvalue)

    that is not 3 strings, that is 3 strings and an int

    either change the parameters,...
  19. Re: Help with Bin to Hex and Hex to Ascii program

    You will then have to pass an int when calling your constructor from main, right now you only have a constructor in main that has 3 string parameters.
  20. Re: Help with Bin to Hex and Hex to Ascii program

    You still don't have a constructor that ONLY takes 3 strings, right now you have a constructor that takes 3 strings and an int
  21. Re: Help with Bin to Hex and Hex to Ascii program

    What have you changed?
  22. Thread: movie arrays

    by camel-man
    Replies
    2
    Views
    169

    Re: movie arrays

    just above the for loop you need to flush the newline character. An easy way to do this is add a line like this in.nextLine();

    After entering an integer you hit the enter key which is left in the...
  23. Re: Help with Bin to Hex and Hex to Ascii program

    You do not have a constructor that takes only 3 Strings for parameters. You need to either create one, or pass in different parameters from main to your constructor.
  24. Re: How do you copy an 5x5 array into a 6x6 and store a new value to take up the sixth position?

    Keep two 1d arrays.

    After you have those values you can run a nested loop that goes newMatrix.length times

    put an if statement in there that whenever you are on the last column or row add in...
  25. Re: How do you copy an 5x5 array into a 6x6 and store a new value to take up the sixth position?

    If I were you I would keep 2 seperate arrays, one for sum of columns and one for sum of rows.

    Do your loops and store the appropriate values in the arrays.

    Then add them using another loop to...
Results 1 to 25 of 444
Page 1 of 18 1 2 3 4