Search:

Type: Posts; User: Abadude

Search: Search took 1.13 seconds.

  1. Re: Help understanding the result of a type int variable

    which is the ternary operator?
    can you explain what the "?" and ":" do?
  2. Help understanding the result of a type int variable

    Can anyone tell me what the "?" and ":" mean in the following statement?

    int y = (x < 100) ? (z > 1 ) ? 4 : 3 : 2;
  3. Re: trouble with making a simple construct for an array of double type

    ohhhhhhhhhhhhhhhhhhhhh I see what I did. i know it was a noob mistake, but thanks!!

    --- Update ---

    Now how would you be able to convert an array into a string?
  4. Re: trouble with making a simple construct for an array of double type

    Here is the code again. Does this make it easier to figure out?


    public class Variable {


    private double[] array;

    public Variable(){
    array[0] = 0.0;
  5. Re: trouble with making a simple construct for an array of double type

    well, i compiled the code many times, and there were no error messages while compiling; only while running.
    While running, however, it says that their is a NullPointerException on


    <array[0] =...
  6. Re: trouble with making a simple construct for an array of double type

    it just keeps prompting me to go to Debug mode, and does not provide a way to correct it, but i know that the error lies in
    "public Variable(){
    array[0] = 0.0;
    }"
    b/c that's where the debug first...
  7. Thread: Beginner code

    by Abadude
    Replies
    11
    Views
    410

    Re: Beginner code

    what kind of IDE are you using?
    if you are using notepad, I suggest you download an IDE such as Eclipse online. They have very easy tutorials on how to use them, and it makes programming much...
  8. trouble with making a simple construct for an array of double type

    Here is my partial code:

    public class Variable {


    private double[] array;

    public Variable(){
    array[0] = 0.0;
    }
Results 1 to 8 of 8