Search:

Type: Posts; User: destinedtale

Search: Search took 0.09 seconds.

  1. Replies
    3
    Views
    997

    Re: Java enquiry!!

    Thanks for replying. I had checked the java operator and they're the same?

    quote from java website link you posted
    equality == and !=
  2. Replies
    3
    Views
    997

    Java enquiry!!

    for(int i=0;i<20;i++){
    if(i>randomPosition -4 && i<randomPosition +4 && i!=randomPosition) i don't understand this part. Especially when i change to != to ==, the code will run wrongly,...
  3. Replies
    7
    Views
    928

    Re: Java problem

    Would like to thank DuncanS, Cornix and mod for the help.

    Although i got the output i wanted, i still need some clarification. Based on the question, shouldn't the code be
    if num2 and num3 are...
  4. Replies
    7
    Views
    928

    Re: Java problem

    here's the problem. If i complete the java code for the following question. I'm getting "Don't know" respond even though i'm suppose to get a "Two larger" respond from the system.

    The question...
  5. Replies
    7
    Views
    928

    Re: Java problem

    I'm suppose to get the output of two larger if i enter 2 for first number, 15 for second and 34 for third.
    using the if else method. But instead i'm getting don't know which is not the result the...
  6. Replies
    7
    Views
    928

    Java problem

    write a program to ask the user to enter 3 numbers called num1, num2 and num3. The program should print "Two larger" if num2 and num3 are both larger than 15. Else if num2 is between 5 and 10,...
  7. Replies
    4
    Views
    937

    Re: for loop with random numbers

    Sorry but i don't understand. Is there anyone who're willing to write a similar java code so i can learn better. Basically the for loop is used because the question asked me to generate a series of...
  8. Replies
    4
    Views
    937

    for loop with random numbers

    Assume that vehicles are going through a two-way traffic intersection. There are three types of vehicles: car, motor bikes and trucks. Generate a series of 10 random integers, between 1 and 3,...
Results 1 to 8 of 8