Search:

Type: Posts; User: aussiemcgr

Page 1 of 20 1 2 3 4

Search: Search took 0.50 seconds.

  1. Re: ClassCastException being thrown?

    It's not the problem, but you should type the ArrayList in your formatData declaration to prevent other types of casting ambiguities:
    private static ArrayList<Integer> formatData(String dataInput)
    ...
  2. Re: ClassCastException being thrown?

    Just to verify, the problem isn't in the formatData() method, correct?
  3. Replies
    0
    Views
    150

    Suggestions for database hosting

    So I have a domain I own, and a website I manage with AWS. I am currently using their 1 year free tier. I set up a database instance which should have been acceptable for the free tier (the database...
  4. Replies
    1
    Views
    76

    Re: testing ActionListener inner class

    You can't access the private class from JUnit, and the actionPerformed method itself doesn't return any value.
    What I would do is:
    1. Check the value of myGreetingField: assume not "Guten Tag"
    2....
  5. Replies
    3
    Views
    97

    Re: Website Security Questions

    Well we were talking about something like:
    1. User requests password reset
    2. We send the user an email with link to reset password
    3. Link makes user answer security questions
    4. We allow user...
  6. Replies
    3
    Views
    97

    Website Security Questions

    So I've been working on a website, and the topic of security questions has come up. I've been reading a lot online about them over the past day or two, and it seems like a lot of people are...
  7. Re: JSF DefaultManagedThreadFactory, I'm overlooking something

    I have a 6 step registration process (all the steps are pretty small).
    There is a rare case where the 5th step requires a bit of preloaded time to set up the initial data (20 seconds, due to calls...
  8. JSF DefaultManagedThreadFactory, I'm overlooking something

    Okay, so I am clearly overlooking something here. In a jsf application, I am attempting to get the DefaultManagedThreadFactory with the following method in a helper class:

    public static...
  9. Replies
    4
    Views
    253

    Re: Semester Project Questions

    1. I agree that the way your professor worded the constructor is odd. I don't see the point of such a constructor since, as you pointed out, the default values will already be set when you initialize...
  10. Replies
    1
    Views
    187

    Re: prepared statement and SQL injection

    To my understanding, PreparedStatement will not make you vulnerable to SQL injection if you use it correctly (ie: parametrized instead of String concatenation).
    Also, what do you mean by...
  11. Re: Best way to handle the MVC design with a databaseDAO

    I've created a complex structure for my database stuff, which allows me to take advantage of common code.
    The structure allows me to pass an instance of a model class, query the database, and parse...
  12. Re: Best way to handle the MVC design with a databaseDAO

    Wait, so do you have like a single Model class or something?
    Usually, with the MVC design, you have:
    1. The model part, which contains all of your model classes
    2. The view part, which contains...
  13. Re: Is Java on the Decline and ASP on the rise?

    A quick search on Indeed.com leads to:
    ASP.Net/C# jobs: ~22,000
    Java job openings: ~86,000

    Hardly scientific, but that's a huge difference.
  14. [SOLVED] Re: Using substring methods to format numbers between 1,000 and 999,999

    You can save yourself a lot of trouble with the "split" method. The method creates an array of Strings based on how you want to split it up. For example:

    String numberIn = sc.nextLine();
    String[]...
  15. Replies
    2
    Views
    160

    Re: numbers as generic class

    T will not be a float, int, ect., they will be: Float, Integer, ect.
    The distinction is primitive vs the object representation of the primitive (the object classes associated with the primitive)....
  16. Re: Not sure what is wrong, but I am sure it is basic.

    Yes. When you do assignments with Objects, it uses references. When you do assignments with primitives, it uses value.

    "from" is just a variable name to use in the constructor. I called it that...
  17. Re: Not sure what is wrong, but I am sure it is basic.

    camel-man is correct. Objects are assigned by reference, not values. I would avoid the Clone methods in java. A better alternative would be to create a constructor in Matrix:

    Matrix(Matrix from) {...
  18. Re: Not sure what is wrong, but I am sure it is basic.

    y would equal 7, but z would equal 10.

    When you say: int z=y, you are copying the value from y into z. Any changes to you make to z will NOT reflect on y. If you wanted to change y and keep z as...
  19. Replies
    3
    Views
    143

    Re: Event Listeners?

    You are close.
    The ActionListener class already exists, so you don't need to create the interface.
    You have the correct idea when you create the Listener, but you are creating it incorrectly.
    What...
  20. [SOLVED] Re: Help with String class private final char[].length

    To my understanding, that is how the length is stored: just a variable.
    In case this provides you with any assistance, here is Java's array specifications (I didn't see anything that directly...
  21. [SOLVED] Re: Help with String class private final char[].length

    Wait, so is your question how the length of an array is determine?
  22. Replies
    3
    Views
    217

    Re: Learning Java

    When I was in high school, we used USACO for practicing for programming competitions. They provide some interesting problems with increasing difficulty as you go.
    Here is the website:
    USACO...
  23. Re: Keep PrintStream Redirect across multiple scenes

    Why don't you like the pattern? Let's start there, so we have something to aim for.
  24. Re: identifying difference between integers and words from user input

    Adding to what Norm said... you can find the API for a class by searching the class name in Google. The API tells you the purpose of the class, as well as all the methods and what those methods do....
  25. Replies
    6
    Views
    260

    Re: Is there a method that counts spaces?

    There should be no problem with charAt. Why do you think it isn't counting spaces? Have you taken into consideration that indexes start at 0, not 1?
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4