+ 7

How to print a statement before taking inputs in java (solo learn )?????

so that the user can know what to input..

4th Nov 2017, 5:14 AM
Neelarghya Kundu
Neelarghya Kundu - avatar
9 Answers
+ 6
It is impossible. Users can know what to input by reading conments in the code
4th Nov 2017, 5:31 AM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 6
but still in many other codes I saw that a pop up box appears with instructions before the input is given
4th Nov 2017, 5:35 AM
Neelarghya Kundu
Neelarghya Kundu - avatar
+ 6
https://code.sololearn.com/c7S7lbwCxw3c/?ref=app. this did not work @innocent Emmanuel.
15th Jan 2018, 2:22 PM
Neelarghya Kundu
Neelarghya Kundu - avatar
+ 6
Yes,I know how to do that in my computer but I wanted to know if it could be done in solo learn
17th Jan 2018, 3:18 PM
Neelarghya Kundu
Neelarghya Kundu - avatar
+ 3
It can also help to provide a sample and even: a default value.
4th Nov 2017, 5:34 AM
Kirk Schafer
Kirk Schafer - avatar
+ 1
it is possible especially when we are making a calculator by asking the user to input numbers and operators
7th Jan 2018, 3:32 AM
Syed Saood
Syed Saood - avatar
+ 1
just d normal out.println would do.... check dis out import java.util.Scanner; class myClass{ public static void main(String args[]){ System.out.println("Hello, Programming is fun"); Scanner kb = new Scanner(System.in); System.out.print("What's your name?"); String name = kb.next(); System.out.println("You are " + name ); } }
14th Jan 2018, 2:12 AM
Innocent Emmanuel
Innocent Emmanuel - avatar
16th Jan 2018, 5:50 PM
Innocent Emmanuel
Innocent Emmanuel - avatar
+ 1
Neelarghya kundu it printed b4 prompting me for input when I tried it with my laptop....
16th Jan 2018, 5:54 PM
Innocent Emmanuel
Innocent Emmanuel - avatar