Search:

Type: Posts; User: JosAH

Page 1 of 20 1 2 3 4

Search: Search took 0.17 seconds.

  1. Replies
    2
    Views
    206

    Re: Using a String[] in a Void or INT???

    You should compare Strings for equality like this: var4.equals("stone") etc.b.t.w. your variable names are miserable.

    kind regards,

    Jos
  2. Re: I have a question regarding a simple code in JAVA

    Using the ascii (or unicode) code of the individual characters is clumsy; aamof using a loop is clumsy too; this little problem begs for a bit of recursion: if the number is a single digit, the...
  3. Replies
    35
    Views
    970

    Re: [Help] Need help with a problem

    The OP also had started another (identical) thread and when I 'spoiled his fun' by posting his encrypted text, to be read for everyone (as it should) he immediately abandoned his own thread, only to...
  4. Replies
    35
    Views
    970

    Re: [Help] Need help with a problem

    I banned the creature; don't bother to reply to any of his threads here; we don't need silly, big mouthing cheaters in this forum.

    kind regards.

    Jos
  5. Replies
    4
    Views
    137

    Re: Asking user for input twice

    That's not it: the nextInt() (and nextDouble()) method only reads a number and no characters following it; that leaves a <newline> character in the input buffer, so a call to nexLine() will read an...
  6. Re: Exception in thread "main" java.util.NoSuchElementException

    Lambda expressions are a litmus test: if you don't understand them, you're really old or not even potty trained ;-)

    kindest regards,

    Jos (<--- loves closures)
  7. Re: Load documents with images or graphics inside

    Have a look at the JavaHelp system: https://javahelp.java.net/. It can do all that you want.

    kind regards,

    Jos
  8. Re: Need help to reach advanced java in 6 months Please!!!!!!!!help!!!!!

    When I started programming (close to fourty years ago) at university, I could scribble a bit of Fortran, Algol and 370 assembly language after six months. Over the years I've seen (and used) myriads...
  9. Replies
    7
    Views
    903

    Re: Counting duplicates in an array

    Plus that the 'solution' (mind the quotes) is dead wrong, but I leave it in for others to laugh at.

    kind regards,

    Jos
  10. Thread: Code formatting?

    by JosAH
    Replies
    14
    Views
    236

    Re: Code formatting?

    Mwuahaha your mother; and what's that sissie with his Ctrl-Alt-L doing here? Formatting is only properly done by pressing Ctrl-A Ctrl-Shift-F; every real man (e.g. me) knows that.

    kindest regards,...
  11. Thread: Code formatting?

    by JosAH
    Replies
    14
    Views
    236

    Re: Code formatting?

    Oh yeah? Well, I prefer to do a Ctrl-A before I do a Ctrl-Shift-F; so there. Nowhere it is stated that doing a Ctrl-A before a Ctrl-Shift-F is forbidden and illegal and my fingers are used to doing a...
  12. Thread: Code formatting?

    by JosAH
    Replies
    14
    Views
    236

    Re: Code formatting?

    I simply let Eclipse do the silly work: Ctrl-A, Ctrl-Shift-F and my entire source file is neatly formatted (the way K&R did it; I hate that Pascal-like curly bracket positioning *).

    kind regards,...
  13. Replies
    2
    Views
    154

    Re: Something not working.. how to revert?

    Either type Ctrl-Z a lot of times or try to restore your previous version from its local backup (right click on your project and select 'Restore from local History').

    kind regards,

    Jos
  14. Replies
    3
    Views
    216

    Re: Need help converting C++ code to Java

    If your package name is 'test', your class should be stored in ~/csc290/bin/test and you should run it from the dir ~/csc290/bin.

    kind regards,

    Jos

    ps. there's a compiler flag that makes the...
  15. Replies
    3
    Views
    216

    Re: Need help converting C++ code to Java

    If your class 'BubbleSort' is in the package 'test', the complete class name is test.BubbleSort and you should run it as such. You're not doing anything with the classpath environment variable so...
  16. Re: find the smallest prime that is greater than 2*n

    Your program doesn't match your description: if searches the numbers [num ... 2*num] and it finds the smallest prime number in that range.

    kind regards,

    Jos
  17. Replies
    12
    Views
    208

    Re: Cannot find symbol method

    Oh dear; salvation is on its way: De Morgan's laws - Wikipedia, the free encyclopedia

    kind regards,

    Jos
  18. Replies
    12
    Views
    208

    Re: Cannot find symbol method

    Yes you are ...

    kind regards,

    Jos ;-)
  19. Thread: Reverse code

    by JosAH
    Replies
    5
    Views
    209

    Re: Reverse code

    Ok, so that means that the names themselves can't have spaces in them; read the API documentation for the String.split( ... ) method; it'll do all the work for you (and it delivers an array of...
  20. Thread: Reverse code

    by JosAH
    Replies
    5
    Views
    209

    Re: Reverse code

    Ok, I'll rephrase my question: are you supposed to supply those four names on one single line? Of course those names can be different from the example.

    kind regards,

    Jos
  21. Re: 2D Game, How could I create a library of tiles?

    I removed all of that spammer's posts and threads, banned the spammer forever and reported him for the anti-spammer database; in short: the spammer went through the rotating knives machine and he is...
  22. Thread: Float error

    by JosAH
    Replies
    6
    Views
    151

    Re: Float error

    True; there are lots of applications where floats/doubles are just fine, e.g. my Simplex and interior point algorithms would die a horrible death if I implemented them by using BigDecimals; there are...
  23. Thread: Float error

    by JosAH
    Replies
    6
    Views
    151

    Re: Float error

    I think that is overkill; BigDecimals also 'suffer' from those 'ulp's (Unit of Least Precision); the only thing you can do to circumvent them is increase the number of decimals, but then those ulps...
  24. Thread: Reverse code

    by JosAH
    Replies
    5
    Views
    209

    Re: Reverse code

    Can you produce an array (or a List) that contains the names you supplied?

    kind regards,

    Jos
  25. Re: beginig prog in java, error java.lang.arrayIndexOutOfBoundException

    That 'unsolves' your problem; you might have a look at the JTable class API documentation as well; now your code throws that exception because you didn't supply two command line arguments and your...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4