Type: Posts; User: camel-man

Page 1 of 19 1 2 3 4

Search: Search took 0.35 seconds.

  1. Re: Why doesn't this for loop allow me to to type the rainfall for each day,but simply prints out "enter the rainfall for day" only allowing me to type one amount?

    you need to use brackets in order to capture all the code you want to be repeated within the loop.
  2. Re: College assignment, i just cant get this to run properly

    add in


    above anywhere you want to ask for a name(after the first name), this is essentially flushing the newline character that is being left in the buffer when nextDouble is...
  3. Re: How to get position of mouse click on a desktop using Java?

    java - How to get location of a mouse click relative to a swing window - Stack Overflow

    Take a look into this link and see if it's what you need.
  4. Re: Is the IT field a dead end career for U.S. born entry level people?

    Depends on what city you are trying to get a job in. There are hotspots and deadspots all throughout the united states.

    As long as you get your foot in somewhere that's all that matters, you can...
  5. Replies

    Re: Need help comprehending this for loop

    Here is the whole process step for step, rememebre that the increments happen after the first loop

    I = 0;i<2 = true
    j=0; j<0 = false


    I=1; I<2 = true
    j=0; j<1 = true
    total = j(0) +...
  6. Replies

    Re: Need help comprehending this for loop

    Look at the inner loop when I = 1
    I = 1 in the outter loop, j = 0, j<1 true, total +=j //here j = 0 so total will =0


    j=1, j<I false //here I =1, 1 is not less than 1

    exits loop
  7. Re: This is in processing if it makes a difference

    you need data types for your parameters.
  8. Re: Commission calculator program help! (Using method)

    Your variable called Salary is always 0, you are never actually initializing it anywhere other than the beginning when it is set to 0.
  9. Re: Commission calculator program help! (Using method)

    What problems are you having specifically?
  10. Replies

    Re: Purpose of constructor?

    You can think of it as a shortcut.

    Take for example these two scenarios

    public class Person{

    private int age;
    private String name;
  11. 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...
  12. 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.
  13. 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
  14. Replies

    [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...
  15. Replies

    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.
  16. Re: How to find the needed info from Java API documentation

    you can use system.out.print()
  17. 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
  18. Replies

    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
  19. 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...
  20. Replies

    Re: Sphere Java Assignment

    you are forgetting the () at the end of your method call
  21. 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){...
  22. Replies

    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.
  23. 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...
  24. Replies

    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...
  25. 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.
Results 1 to 25 of 454
Page 1 of 19 1 2 3 4