Search:

Type: Posts; User: Loh Jane

Search: Search took 0.71 seconds.

  1. Replies
    3
    Views
    15

    Re: School work Question 1

    The answer should be true. Please refer to the following example.

    public class Example
    {
    String id;

    public Example(String i)
    {
    this.id = i;
    }
  2. Replies
    3
    Views
    15

    School work Question 1

    Hi Java Professionals,
    I need to do the following question and I don't know how to do, please teach me, thanks a lot in advance.

    A constructor can invoke the constructor of the the direct...
  3. Replies
    2
    Views
    14

    My modulus result is wrong.

    Hi Java professionals,
    my remainder result is always wrong and I cannot understand why. The following is my code,please help,many thanks in advance.



    import java.awt.*;
    import javax.swing.*;...
  4. Re: How to write a String name variable to store letters,dotes and spaces only in Java?

    The nextLine() method only works for one time. The program fails when there is a loop.
  5. How to write a String name variable to store letters,dotes and spaces only in Java?

    Hi Java professionals,
    I am trying to write a program and the name variable can only store letters,dotes and spaces. But whenever I enter a space, the program doesn't work. Please help, thanks in...
  6. Replies
    3
    Views
    130

    Re: An email validation in Java

    Yes it works finely but I need to submit it.So I want to confirm if the pattern is correct.
  7. Replies
    3
    Views
    130

    An email validation in Java

    HI Java professionals,
    I want to validate an email input. The email input can only have one @ and at least one '.' after the @.
    I would like to ask if my regex pattern is correct, thanks.

    ...
  8. Re: How to limit users to enter only 12 digit input and an integer value in Java?

    Thanks but my program must not accept any letter or symbol and it must only accepts numbers,please advise.
  9. Re: How to limit users to enter only 12 digit input and an integer value in Java?

    Hi,
    but I need to loop it if the input is incorrect,do you have any other advice?

    --- Update ---

    I mean the program needs to loop and it only accepts a numeric input.
  10. How to limit users to enter only 12 digit input and an integer value in Java?

    Hi Java professionals,
    I want to limit the program to only accept a 12 digit input and an integer value but I don't know how to program it,please help.

    import java.util.Scanner;
    public class...
  11. Re: How to limit users to only enter integer into a String variable.

    Hi,
    I amended my code but I also need to make the program only accept a 12 digit number and currently it doesn't accept "098765432199".It means the first digit cannot be zero,please help.

    ...
  12. How to limit users to only enter integer into a String variable.

    Hi Java Professionals,
    I need to allow users only enter integer into a String variable, "input" and I am not sure what statement to use. Please help, thanks a lot in advance.

    import...
Results 1 to 12 of 12