Search:

Type: Posts; User: Tsarin

Page 1 of 2 1 2

Search: Search took 0.51 seconds.

  1. Replies
    1
    Views
    797

    Re: Need help for making a world-clock.

    a new Date object initializes to the current UTC date/time.

    You can use the Simple Date format to set a time zone, which you get from TimeZone. Then use it to build your formatted date.



    ...
  2. Re: Which languge do i have to choose to develop a social netwking site ?

    If you have two months to make it live, go with php, unless you have lots of experience and can develop an application quickly in java.
  3. Thread: Interfaces

    by Tsarin
    Replies
    13
    Views
    525

    Re: Interfaces

    More or less, a system which you are interacting with is expecting a square. If you have a number of different developers, say, Bob, John and Sam, who want to interact with this system, they will all...
  4. Thread: Interfaces

    by Tsarin
    Replies
    13
    Views
    525

    Re: Interfaces

    Just as some applications require a user to intact with it, using a UI; some require interaction with other applications, systems and processes. This is done via an API. in java, an interface defines...
  5. Replies
    3
    Views
    2,101

    Re: JSF: Dynamically building SelectItems

    It turned out to be a JSF Lifecycle issue. I have resolved it by creating a new page dedicated to organizing the programmes. Not ideal, it at least it works.
  6. Replies
    3
    Views
    2,101

    Re: JSF: Dynamically building SelectItems

    The pagecode (EditProgrammeMatrix) is request; and it is retreiving data from ProgrammeHandler, which is session.
  7. Replies
    3
    Views
    2,101

    JSF: Dynamically building SelectItems

    Hi Guys and gals,

    I have been banging my head against this wall for a couple days and am coming up to the stage where I just put in an ugly work around, but I would rather solve it and learn...
  8. Replies
    3
    Views
    328

    Re: How to replace dollar signs with ""?

    Try


    String.replaceAll(String statement, String replacement)


    String (Java 2 Platform SE v1.4.2)
  9. Replies
    31
    Views
    2,570

    Re: string==null or string.equals(null) problem

    The following is testing if the string variable is null in memory.



    str == null



    A string variable can exist without any content
  10. Replies
    5
    Views
    463

    Re: Using char at to split up a interger

    49 is the ascii value for the char "1". Java is assuming you want to convert the primitive char into the ascii value of its content.

    Your best bet would be to either to read the whole number in...
  11. Replies
    7
    Views
    336

    Re: CMD line is owning me

    I was having this problem too, even though I was adding the location to the class path, it was not pickiong it up. Try running the app with the command



    java -cp C:\myFolder\ HelloWorld
  12. Replies
    12
    Views
    1,420

    Re: use Delimiter, Scanner Class

    It looks like you want to replace the / with a new line, have a look at the String.replaceAll(String expr, String substitute) method.
  13. Replies
    1
    Views
    336

    Re: copying and comparing stacks

    Are you looking for



    Thread.currentThread().getStackTrace();


    This will return an array of [StackTraceElement]s.
  14. Replies
    1
    Views
    298

    Re: How to separate ArrayLists in memory?

    This looks like an issue with what the two methods are returning. If you can't spot anything, try do a system.out of everything which is being returned by each of these methods and confirm it is...
  15. Re: Problem with my jsp code .Need Help Please!!!

    Return a string from your pagecode which matches a navigation rule in your faces config, the serverlet interprites this as a redirection and will load that page.
  16. Re: Checking Code: Getting the Unicode value of each character from a string.

    I'm not entirely sure what you mean, but have a look at what this line is doing, is it ever true?

    if(s.charAt(i) <= s.length())
  17. Re: How to make data available to two different classes - theory and code question

    I'm not entirely sure I understand, but I think your best bet would be to draw a little diagram of everything involved and see what needs what.

    e.g a Game has many Players and one Board. the...
  18. Re: How do I call a method from the main method?

    Have a go at using the examples to call method1, let me know how you go :)
  19. Re: How do I call a method from the main method?

    You use the method name, followed by parenthesis "()". You put arguments in the brackets, separated by a comma.

    A method is made up of several parts, lets look at:



    public void...
  20. Re: How do I call a method from the main method?

    You us the method name and argument pattern to refer to it, e.g:



    public static void main(String[] args){

    //Will work
    someMethod("Hello World");
  21. Re: application that determines and prints the number of odd, even, and zero digits

    Yes, it will, but the code is testing if it is the number 0, rather than a character, or String containing "0", which is what the method is returning.

    When testing the content of a string, use...
  22. Replies
    4
    Views
    320

    Re: Struggling with if and if else

    if(!rested){
    sleep.dream("if statements");
    }


    Your codes looking good, don't forget to put it into code tags to make it easier to read :)

    First of all, you will need to decide what the...
  23. Replies
    4
    Views
    1,894

    Re: Finding Multiple Equal Max Values in an Array

    What you could do is create an ArrayList of Player(s), add the first player to the array list. Iterate through the rest of the players and check if their score is greater than the score of the first...
  24. Thread: Loop Help

    by Tsarin
    Replies
    4
    Views
    490

    Re: Loop Help

    When doing a string compare use the function: String.equals(String)
    The reason is a String is an object and "==" is a binary compare. Two different strings which have the same content, are not...
  25. Re: application that determines and prints the number of odd, even, and zero digits

    Have a look where you are testing if it is a zero. What does this method return?

    See:
    String (Java 2 Platform SE v1.4.2)
    "
    charAt(int index)
    Returns the character at the specified...
Results 1 to 25 of 42
Page 1 of 2 1 2