python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Not printing lines until after completion Java
I created a mortgage calculator which works just fine but I don't want to use println() when asking for user input. I want the user to be able to type on the same line; however, everytime i use print(...

user17067764
Votes: 0
Answers: 0
The Java Scanner is not taking my String Input
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int i = scan.nextInt();
double d = scan.nextDouble();
String s = scan.nextLine();
System.out.p...

Rhitam Chaudhury
Votes: 0
Answers: 2
Scanner method .hasNextInt() and if statement - works only 1 time. For next loop - automatically (didn't wait any input) gives false
I tried to do an input check (need to take 3 numbers using Scanner).
Before that, I used a similar method (.hasNext(int)) in another task - everything worked fine. In this case, it doesn't work.
The f...
IvMovchanets
Votes: 0
Answers: 1
How can I let the user input repeat my code in java?
Here is my code so far. (this is part of it, it's very long) I can't figure out what's wrong with it. I have tried searching for other answers on this website and tried something similar but still don...
Aya Abdalla
Votes: 0
Answers: 1