Search:

Type: Posts; User: R0bsterz

Search: Search took 0.08 seconds.

  1. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    FIXED, thanks for your help guys =]
  2. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    i know what a variable is
    i don't fully know how to assign a value to a variable
    i dont know how to call a method
    i dont know how to assign the value that the method returns to a variable...
  3. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    I really dont understand this...
    Can someone just edit my code and leave comments on each line? (Im a **** noob at java)
  4. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    how?
  5. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    How?
  6. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    And someMethod(); is? (what shall i enter for it?)
  7. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    I dont know how to save the user input in step 1
    2. Im not sure, can u tell me>?
  8. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    This is what i want the program to do

    1. Wait for the user input from the scanner/JOptionPane Dialogue Box
    2. If the user input is the word "Sammy" then say "Hello Sammy"
    3. If the user input is...
  9. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    1. Well ideally, i would like to import the JOptionPane from javax.swing.JOptionPane and let the user import it from there
    2. Im not sure, u can tell me what/how to do this...
  10. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    No, It does not give me a box to enter the data..

    --- Update ---

    This is what i want the program to do:

    1. Wait for the user input from the scanner
    2. If the user input is the word "Sammy"...
  11. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    I compile the code and my cursor says its loading... then nothing happens. (I compile + run with eclipse.)

    So this is what i want my code to do:
    http://i45.tinypic.com/674ec4.png
  12. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    My code at the moment:


    import java.util.Scanner;

    class ifelse {
    public static void main (String args[]) {

    Scanner uinput = new Scanner (System.in);
    String uinputvar =...
  13. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    How do i make a new string that takes the value of the scanner "guest" and then use it with the .equals method?
  14. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    1. When i ran the code in post #20 it didnt run properly -- looks like i didnt close the scanner or somthing.
    2. i didnt understand post #21
    3. if (name.equals(name)) {
    was meant to mean: if...
  15. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    Fix this code instead:


    import java.util.Scanner;

    class ifelse {
    public static void main (String args []) {
    String name = "Sammy";

    Scanner guest = new Scanner (System.in);
  16. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    This is my code at the moment. Sorry Norm, but I do not understand what you are saying when you are trying to help me :P, please edit my code and 'fix it' and add comments on each line so i can learn...
  17. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    Sorry but i really dont understand you..
    Please add what your saying to my code and i will be eternally grateful.
  18. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    import java.util.Scanner;

    class ifelse {
    public static void main (String args []) {
    String name = "Sammy";

    Scanner guest = new Scanner (System.in);
    System.out.println("Hello, What...
  19. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    Ok, so i edited the code a bit and it now looks like this:

    import java.util.Scanner;

    class ifelse {
    public static void main (String args []) {
    String name = "Sammy";

    Scanner...
  20. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    Sorry, but i dont understand what you mean by a seperate one input by the user, please could you add the code to my code and show me,

    Thanks =]
  21. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    I read your post but how will i create a new variable for the input?
  22. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    Thanks for this, so to close the scanner i do


    scanner1.close();

    --- Update ---


    import java.util.Scanner;
  23. Replies
    52
    Views
    4,020

    Re: Help me with my code (im learning Java)

    Thanks for this, however i tried entering my new code:


    import java.util.Scanner;

    class ifelse {
    public static void main (String args []) {
    String name = "Sammy";

    Scanner scanner1...
  24. Replies
    52
    Views
    4,020

    Help me with my code (im learning Java)

    class ifelse {
    public static void main (String args []) {
    String name = "Sammy";

    if (name == "Sammy"); {
    System.out.println("Hello "+ name);
    }else{
    System.out.println("Sorry...
Results 1 to 24 of 24