Search:

Type: Posts; User: pbrockway2

Page 1 of 20 1 2 3 4

Search: Search took 0.62 seconds.

  1. Replies
    3
    Views
    38

    Re: I need help! (super simple code)

    -----
  2. Replies
    1
    Views
    35

    Re: Assignment help

    Hi proroc4, welcome to the forums!

    If you haven't already seen it, have a read of the Announcement thread which contains good advice about how to make the most of the resources here.

    No-one is...
  3. Re: Why is this variable not being changed by this method?

    Extending your code a little...



    int bucky = cool.nextInt();
    int original = bucky;
    System.out.println(bucky); // (1)
    change(bucky);
    System.out.println(bucky); // (2)...
  4. Replies
    9
    Views
    143

    Re: Locking the camera on character

    There is no Camera class in the API.

    The games are 2D so I'm guessing that what you are calling the "camera" is the view: ie, the portion of the total space that is rendered on the screen.

    To...
  5. Replies
    1
    Views
    69

    Re: VERY simple problem

    That isn't Java. And nothing on Qualtrics: Online Survey Software & Insight Platform website provides any documentation. (Not an encouraging sign of a product's worth.) Perhaps you could post a...
  6. Replies
    10
    Views
    124

    Re: Java and Eclipse

    Because, as I said, you don't execute java test.class, rather you execute


    java test

    Note that Java is case sensitive and classes (and their corresponding java and class files) usually begin...
  7. Replies
    10
    Views
    124

    Re: Java and Eclipse

    One way would be a batch file to invoke the java runtime. Eg a single line


    java MyClass

    Where MyClass.class is the class with a main method. Note how you specify the class not the file. ...
  8. Replies
    3
    Views
    77

    Re: Need Help With Java Trig

    @op: I agree with Greg, but are you being asked to develop your own algorithm for this?

    I think of this as the "orchard" problem. You are standing at a tree and facing in some direction theta. ...
  9. Replies
    10
    Views
    124

    Re: Java and Eclipse

    A java compiler is designed to produce .class files, not .exe files. The compiler used by Eclipse is no exception.

    Often you find .class files and other resources that a program uses bundled...
  10. Replies
    1
    Views
    55

    Re: Date validation not working.

    Please format your code so that it's readable.



    public boolean appearsGood() {

    // remember to indent!
    return tagsUsed;}
  11. Replies
    9
    Views
    143

    Re: Locking the camera on character

    @OP: I'm sure I'm not the only one who would like to help, but I don't have a clue what org.newdawn.slick.* is. A link would be good, and it might clarify what a "camera" etc is.

    Also good APIs...
  12. Replies
    3
    Views
    114

    Re: Code for knapsack problem

    (1) The general idea is to catch the InputMismatchException and when you've caught it break out of whatever loop you are using to get the user's data.



    What did you try? It would help if you...
  13. Re: Cannot figure out how to write this function

    It's quite common to see lists dealt with using lots of recursion, and no loops in sight! Far from being complex, the correctness of the code tends to jump out at you. #3 was supposed to be a hint,...
  14. Replies
    3
    Views
    111

    Re: Print certain amount of multiples

    You're welcome.
  15. Re: Cannot figure out how to write this function

    The tail is a list consisting of everything *except* the head. Calling it multiple times you end up with the empty list, not the head.

    In fact I was assuming you wanted a purely recursive...
  16. Replies
    8
    Views
    114

    Re: Roman to ordinary number conversion

    Hi archijava_19, do you see the problem people are having with what you are saying? If you can't use any methods, then all you have left to work with are the +,-,*,/ and % operators. But the only...
  17. Re: I cannot restore database in JAVA. HELP!

    So, it's not your code...

    That blog and it's author would be the best place to ask. Don't forget to say you can't restore your database with that code. Ie, what happens when you try.

    Reading...
  18. Replies
    3
    Views
    111

    Re: Print certain amount of multiples

    Although you have to implement printFirstKMultiples(fac,num) it might pay to consider implementing a different method: printMultiples(fac,from,to) which prints the multiples of fac from from*fac...
  19. Re: Cannot figure out how to write this function

    An aside, while I think about the question, as choices of variable name l, l0 and o suck. If the code was given to you by your teacher feel free to pass that opinion on.

    [Edit] An interleaved...
  20. Re: I cannot restore database in JAVA. HELP!

    Is that intended? Or should it have an = like the other arguments?
  21. Re: Quick questions before I start learning.

    A good question.

    There are others better qualified than me to say, but I get the feeling that computer programmers tend to break down tasks into discrete components that have to be executed in a...
  22. Re: Quick questions before I start learning.

    define: API

    The Java compiler comes with a large API - people will often refer to them as the "standard classes" or similar. There are other APIs you can download, but you won't require them to...
  23. Re: Convention question: how to manage imports?

    I'm not a professional and I don't live in the real world (or so my "friends" tell me) but I think lots of import package.ActualClass are just fine.

    The thing is they make your code literate: they...
  24. [SOLVED] Re: HW Problem using for loops and if else statements

    You're welcome. I'm glad you've got it calculating x properly. By the way short variables are not such a good idea - especially l which looks too much like 1. len is only a couple more keystrokes!
  25. Replies
    3
    Views
    80

    [SOLVED] Re: Method header for file names?

    Also at java-forums.org.

    Please, if you are going to start a discussion a multiple places, post a link at each of them to all of the others. That way everybody taking part in the discussion knows...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4