Search:

Type: Posts; User: JosAH

Page 1 of 20 1 2 3 4

Search: Search took 0.20 seconds.

  1. Re: NetBeans IDE 8.0 - Error: Could not find or load main class Java.display

    @OP: I noticed the report of this thread w.r.t. Gimbal2; NetBeans is used by zillions on users (a few more use Eclipse) so most likely its you who is doing something wrong (a trivial thing most...
  2. Re: printing GregorianCalendar default constructor?

    Good and you're welcome of course; if you look back at your code, you'll see that your class has a Calendar as well as a day, month and year variable; your Calendar 'knows' the day, month and year so...
  3. Re: printing GregorianCalendar default constructor?

    Did you experience your Eureka moment?

    kind regards,

    Jos
  4. Re: printing GregorianCalendar default constructor?

    Your setters and getters are not correct; the calendar 'knows' the correct date but your getters don't return the date parts of the calendar. Also your setters don't make sense (they set their...
  5. Re: Need help using the MATH class for an assignment

    Does your program produce the correct results? As you have figured out already, the Math methods assume angles measured in radians ...

    kind regards,

    Jos
  6. Re: How to perform an action only if a certain amount of time has passed

    No it isn't; think of it this way: the first moment a wanted target value arrives, you start that TimerTask for a certain time in the future; next you do nothing until a next number comes in. If the...
  7. Re: How to perform an action only if a certain amount of time has passed

    Check out the java.util.Timer class and its TimerTask companion.

    kind regards,

    Jos
  8. Replies
    10
    Views
    216

    Re: what am I doing wrong?

    Story well told? Where are Huey, Dewey, and Louie then? This isn't much of a story; quack!

    kindest regards,

    Jos
  9. Re: Need help using the MATH class for an assignment

    There's only one math class, and it's named Math; it has a bunch of static methods; e.g. Math.sin(x) returns the sine of angle x (measured in radians). Read its API documentation for the details.
    ...
  10. Replies
    10
    Views
    216

    Re: what am I doing wrong?

    You can say that again; I've never seen Donald Duck painted that badly ...

    kindest regards,

    Jos ;-)
  11. Re: how can two same Integers be interpreted as different numbers?

    Time for some fun; have look at this code and its output:



    import java.util.ArrayList;
    import java.util.List;

    public class Autoboxing {

    public static void main(String[] args) {
  12. Re: Trying to create a calculator (Very new to java)

    It would be nice to show exactly what you did to solve the problem. Other readers who stumble up on this thread might want to know ...

    kind regards,

    Jos
  13. Re: Trying to create a calculator (Very new to java)

    You can't compare two Strings for equality with the == operator; use the String.equals( ... ) method instead (read the API documentation for the String class).

    kind regards,

    Jos
  14. Thread: even array fail

    by JosAH
    Replies
    4
    Views
    105

    Re: even array fail

    Is the same( ... ) method supposed to return false if two elements in the two arrays are the same? I guess you wanted != instead of ==

    kind regards,

    Jos
  15. Replies
    4
    Views
    132

    Re: How to write for a mini compiler

    *ouch* knock if off, you pig-dog!



    I doubt the OP realizes the complexity of that simple language: the fragments show arrays; they need to be declared; is bounds checking needed? Are 'arrays of...
  16. Replies
    4
    Views
    132

    Re: How to write for a mini compiler

    Have you written a parser and lexical analyzer (tokenizer) yet? (hint: see one of my blog articles; it implements expression parsing; it can be a fine basis for your little language (the article come...
  17. Replies
    21
    Views
    272

    Re: Can you set a value to extended class?

    If D extends B and you create a new D, memory is allocated for an object D which consists of all members of B plus the members defined in D. The constructor for D sets the latter members after the...
  18. Thread: Newlines

    by JosAH
    Replies
    9
    Views
    170

    Re: Newlines

    Shh, I'm waiting for my old espresso machine (it makes noises as if it were a pneumatic hammer but it's slow as molasses; in the mean time I'm rolling my cigarette).

    kind regards,

    Jos
  19. Thread: annotation error

    by JosAH
    Replies
    11
    Views
    156

    Re: annotation error

    No I'm not; I'm promoting proper spelling; I'm so sick and tired of that text speak nonsense ...

    kind regards,

    Jos
  20. Thread: Newlines

    by JosAH
    Replies
    9
    Views
    170

    Re: Newlines

    First 'sample' the file, i.e. start reading it using an InputStream; if it can read a \n it is probly a Unix file, if it reads a \r first it has to read the next byte; if it is a \n the file is...
  21. Thread: annotation error

    by JosAH
    Replies
    11
    Views
    156

    Re: annotation error

    First find yourself a proper keyboard and screen because this txtspeak rubbish is hardly readable.

    kind regards,

    Jos
  22. Re: Java converting a percentag grade to a letter grade - not running

    Is it what? I don't see arrays in your code and you don't need them; a sequence of if ... else if ... else statements can solve the problem nicely.

    kind regards,

    Jos
  23. Re: Printing repeating integers in an array problem!

    This thread is more than two years old; it deserves to be left alone.

    Jos
  24. Re: 2 doubles of same value does not euqal? whattt!!!!

    ...and print them out using the Double.toLongBits() method ...

    kind regards,

    Jos
  25. Re: Own server Based on com.sun.net.HttpServer, hyperlinks not working

    You have created an incorrect context; try "/" for starters.

    kind regards,

    Jos
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4