Search:

Type: Posts; User: ozzyman

Page 1 of 20 1 2 3 4

Search: Search took 0.10 seconds.

  1. Replies
    4
    Views
    398

    Re: Line2D, getting NullPointerException

    which line is line 65?
  2. Re: Cookies and request.getAttribute() / request.setAttribute() question

    If they land on the "file.jsp" page directly, you should send them backward to the starting point (wherever that may be in your system).

    It's just like any website with a login area, if you try to...
  3. Replies
    6
    Views
    678

    Re: print screen help

    The time is in milliseconds. In future you can refer to the java docs if you're not sure. In fact I posted the link to it already in my previous post.

    In case you don't know, 1000 milliseconds = 1...
  4. Thread: Stack Elements

    by ozzyman
    Replies
    15
    Views
    627

    Re: Stack Elements

    Dougie, you can create a Comparator with a generic type and then override the compare(T obj1, T obj2) method to compare two of your objects (of type T).

    You just need to tell the Comparator how to...
  5. Replies
    12
    Views
    2,287

    Re: ArrayList

    You just need to show all the bits of code where things are added or removed from the ArrayList so you can see where the ArrayList is being emptied.

    I can see your methods for adding to the...
  6. Replies
    12
    Views
    2,287

    Re: ArrayList

    I did mean the actual code for the pseudo-code of the methods to do with the ArrayList that you posted before.

    Anyhow, this doesn't seem right:
    1. You're using the ArrayList.add(int index, Object...
  7. Replies
    6
    Views
    678

    Re: print screen help

    If you use a while loop you have two problems:
    1) Your thread doesn't respond until the while loop has finished and
    2) Capturing the images every second would clog up your main thread anyway

    So...
  8. Replies
    12
    Views
    2,287

    Re: ArrayList

    The JVM doesn't lie; if it says the array size is 0 it means its 0.

    There must be something in your code removing it or clearing the arraylist.

    Either that or you're using the wrong variable.
    ...
  9. Thread: Shortest path

    by ozzyman
    Replies
    5
    Views
    581

    Re: Shortest path

    Where -what- was? You didn't tell us anything about any error messages, compile problems or your current output.
  10. Replies
    4
    Views
    509

    Re: trouble in getting pattern with regex

    Why didn't you just parse the XML to get the values directly?

    There are tools in java to read XML files for you.

    You could have read the values into objects and then write/map those objects to...
  11. Thread: Shortest path

    by ozzyman
    Replies
    5
    Views
    581

    Re: Shortest path

    Please edit your incredibly long post, and replace it with a clear, concise question relating to a specific problem or error you are having.

    If you had said, I need my output to be "this" and its...
  12. Replies
    6
    Views
    566

    Re: Question about split()

    trim() wont help you here

    Use String.replace(" ", "") to replace white space with nothing

    Then use String.toCharArray() to return a char[] array which will contain each char in a separate array...
  13. Replies
    6
    Views
    678

    Re: print screen help

    So you want one pic every second?

    You could use a Timer, TimerTask and Timer.scheduleAtFixedRate(TimerTask, 100, 1000) to repeat the task every second, starting after 0.1 seconds.

    Then you...
  14. Replies
    6
    Views
    566

    Re: Question about split()

    String.split allows you to specify a delimiter to split the String by.

    Try something like this instead:


    String s = "split-this-string";
    String[] sArr = s.split("-");


    String.trim()...
  15. Replies
    4
    Views
    3,474

    Re: How to insert music such mp3 to java program

    Please edit your post to wrap your code in CODE tags so that it is formatted.

    Please also indent your code so that it is easier to read.

    Also, please only post code that is relevent to your...
  16. Replies
    3
    Views
    927

    Re: Guidance for Stock trading software

    Yes, but don't worry so much about the different words they use. Java, Core Java, Servlet, and Beans are all written in the same language.

    "Core Java" just means the Java Standard Edition (talking...
  17. Replies
    1
    Views
    423

    Re: Problem when reading files

    You will need to take input from the User, which you could do with the Scanner class. You then need to read a text file and check if what the user entered matches any password/username combination -...
  18. Re: Creating recursion method to use Newton's method for square roots

    Instead of using a while loop, you need to allow the method to call itself to repeat the part of code you are repeating in your loop. Get your logic right, or you could get a StackOverflow error -...
  19. Re: I was wondering if it is possible to record with Java

    Well if you can get XBOX 360 on your PC monitor, you could quite easily record it by taking screen captures and then saving the frames or creating a video of the frames and saving that.

    You will...
  20. Replies
    2
    Views
    565

    Re: Multiple java elements won't play nice.

    I totally agree with Fubarable here, except for one thing: Java is to Javascript as Ham is to Hamster?

    I'll give you a better one; Java is to Javascript as Ham is to Hamburger.

    You could've...
  21. Replies
    4
    Views
    601

    Re: drawing in java

    Maybe you need to revalidate the layout after you've done your painting? I haven't tried your code but that would be something I'd check out
  22. Replies
    12
    Views
    2,287

    Re: ArrayList

    IndexOutOfBoundsException means that in your Array or ArrayList/Collection (any type of array) there was an attempt to access an element at an index that didn't exist or was invalid.

    In this case...
  23. Replies
    1
    Views
    451

    Re: Help with Abstract Classes please.

    This is very similar to your other question. Again, you should read the inheritance java tutorials fully so that you understand it properly.

    Here is the link again:
    Inheritance (The Java™...
  24. Thread: Stack Elements

    by ozzyman
    Replies
    15
    Views
    627

    Re: Stack Elements

    You can create your own comparator to compare any object you like... what do you mean Collection objects? a Collection can hold any object... its just a collection...

    If you prefer to reuse code...
  25. Re: Very interesting Abstract Class behavior. Please Help :)

    The field 'age' in ConcClassA hides the field 'age' in its super class. If you remove this field from the sub-class, then the variable 'age' will have to refer to the field in the super class. This...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4