Click here to Skip to main content
15,886,067 members
Home / Discussions / Java
   

Java

 
GeneralRe: Java Program Examples Pin
Nelek13-Feb-17 5:38
protectorNelek13-Feb-17 5:38 
AnswerRe: Java Program Examples Pin
Richard MacCutchan13-Feb-17 4:21
mveRichard MacCutchan13-Feb-17 4:21 
GeneralRe: Java Program Examples Pin
Nelek13-Feb-17 5:38
protectorNelek13-Feb-17 5:38 
GeneralRe: Java Program Examples Pin
Richard MacCutchan13-Feb-17 5:57
mveRichard MacCutchan13-Feb-17 5:57 
GeneralRe: Java Program Examples Pin
Nelek13-Feb-17 19:22
protectorNelek13-Feb-17 19:22 
GeneralRe: Java Program Examples Pin
Richard MacCutchan13-Feb-17 21:50
mveRichard MacCutchan13-Feb-17 21:50 
GeneralRe: Java Program Examples Pin
Nelek13-Feb-17 22:02
protectorNelek13-Feb-17 22:02 
QuestionI could never understand this Pin
Member 1297423511-Feb-17 8:07
Member 1297423511-Feb-17 8:07 
Why in a Java program that asks for user input the blinking cursor is not positioned where it should be.

Look at this code:

public class GettingInput
{
   public static void main(String args[])
   {
	   int x;
	   int y;
	   
	   Scanner in = new Scanner(System.in);
	   
	   System.out.print("Enter a number: ");
	   x = in.nextInt();
	   
	   System.out.print("Enter another number: ");
	   y = in.nextInt();
	   
	   int sum = x + y;
	   
	   System.out.println("Sum is " + sum);
   }
}


When I run the program the blinking cursor is never where it should be. Seems to me it should be after the word number: cursor should be here.

But I can never get it there.

Is there something I'm doing wrong when I run my program or is this just a Java quirk?
AnswerRe: I could never understand this Pin
Afzaal Ahmad Zeeshan11-Feb-17 9:21
professionalAfzaal Ahmad Zeeshan11-Feb-17 9:21 
GeneralRe: I could never understand this Pin
Member 1297423511-Feb-17 11:31
Member 1297423511-Feb-17 11:31 
GeneralRe: I could never understand this Pin
Richard MacCutchan11-Feb-17 20:42
mveRichard MacCutchan11-Feb-17 20:42 
GeneralRe: I could never understand this Pin
Member 1297423512-Feb-17 15:12
Member 1297423512-Feb-17 15:12 
GeneralRe: I could never understand this Pin
Richard MacCutchan12-Feb-17 23:08
mveRichard MacCutchan12-Feb-17 23:08 
AnswerRe: I could never understand this Pin
sourcebewithyou20-Feb-17 23:00
sourcebewithyou20-Feb-17 23:00 
QuestionCan we merge multiple PPTX files into single file using JAVA ? Pin
Anurag P11-Feb-17 0:43
Anurag P11-Feb-17 0:43 
AnswerRe: Can we merge multiple PPTX files into single file using JAVA ? Pin
Richard MacCutchan11-Feb-17 0:46
mveRichard MacCutchan11-Feb-17 0:46 
QuestionECG Analysis Pin
Member 1125298810-Feb-17 8:21
Member 1125298810-Feb-17 8:21 
AnswerRe: ECG Analysis Pin
Richard MacCutchan10-Feb-17 10:30
mveRichard MacCutchan10-Feb-17 10:30 
QuestionJava Coding Guidelines Pin
Jonathan Hicks3-Feb-17 6:34
Jonathan Hicks3-Feb-17 6:34 
QuestionRe: Java Coding Guidelines Pin
Richard MacCutchan3-Feb-17 6:44
mveRichard MacCutchan3-Feb-17 6:44 
AnswerRe: Java Coding Guidelines Pin
Jonathan Hicks3-Feb-17 6:47
Jonathan Hicks3-Feb-17 6:47 
GeneralRe: Java Coding Guidelines Pin
Richard MacCutchan3-Feb-17 6:56
mveRichard MacCutchan3-Feb-17 6:56 
AnswerRe: Java Coding Guidelines Pin
Peter_in_27803-Feb-17 10:24
professionalPeter_in_27803-Feb-17 10:24 
Questionbookstore java project Pin
Amit Kumar Patni31-Jan-17 15:19
Amit Kumar Patni31-Jan-17 15:19 
AnswerRe: bookstore java project Pin
Richard MacCutchan31-Jan-17 20:37
mveRichard MacCutchan31-Jan-17 20:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.