Consider the following program which is created and executed in
java 1.5
import java.util.Scanner;
public class EchoTextLine {
public static void main(
String[] args) {
System.out.println("Enter text :");
Scanner myScanner = new Scanner(System.in);
System.out.println(myScanner.nextLine());
}
}
Try running this program and you will see that the text Enter text: is displayed and one the next line next line the cursor is placed for input from the user, what i would like to know if it is possible to maintain the cursor position just next to Enter text : text this is similar to the one i used to do in C, C++ programming languages.
Thanks in Advance.