The answer should be true. Please refer to the following example.
public class Example
{
String id;
public Example(String i)
{
this.id = i;
}
Type: Posts; User: Loh Jane
The answer should be true. Please refer to the following example.
public class Example
{
String id;
public Example(String i)
{
this.id = i;
}
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...
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.*;...
The nextLine() method only works for one time. The program fails when there is a loop.
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...
Yes it works finely but I need to submit it.So I want to confirm if the pattern is correct.
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.
...
Thanks but my program must not accept any letter or symbol and it must only accepts numbers,please advise.
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.
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...
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.
...
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...