+ 1

Use input question

How do I go about making the input screen ask to input your name? Instead of showing up after inputting the name and just showing up with the name under the text?

13th Dec 2018, 7:45 PM
Dustin James Locey
Dustin James Locey - avatar
18 Antworten
13th Dec 2018, 7:45 PM
Dustin James Locey
Dustin James Locey - avatar
+ 1
As per my experience , the Interactivity that you wan't in your code is not possible in sololearn app for languages like java, c++,c etc. input is taken before running the code ,code runs at their server and then the output is displayed on the screen.
13th Dec 2018, 8:09 PM
Mukul
Mukul - avatar
+ 1
Ohh, okay, if I wasnt to use sololearn for it and just writing a java program, how would I go about doing that?
13th Dec 2018, 8:12 PM
Dustin James Locey
Dustin James Locey - avatar
+ 1
Try using your program in another app and you’ll see it work just as you want.
13th Dec 2018, 8:15 PM
Diego
Diego - avatar
+ 1
So I did code it right though?
13th Dec 2018, 8:15 PM
Dustin James Locey
Dustin James Locey - avatar
+ 1
Sorry, I'm a beginner
13th Dec 2018, 8:15 PM
Dustin James Locey
Dustin James Locey - avatar
+ 1
One more question. To run it on my pc, I need to use java doc right? And do I just go to the java folder and open java doc? I've never really used anything java related before
13th Dec 2018, 8:19 PM
Dustin James Locey
Dustin James Locey - avatar
+ 1
Yes
13th Dec 2018, 8:21 PM
Dustin James Locey
Dustin James Locey - avatar
+ 1
I have the eclipse ide
13th Dec 2018, 8:23 PM
Dustin James Locey
Dustin James Locey - avatar
+ 1
I'm not sure how to do it in a command line
13th Dec 2018, 8:23 PM
Dustin James Locey
Dustin James Locey - avatar
+ 1
I know how to open the command prompt, but idk what to input there
13th Dec 2018, 8:23 PM
Dustin James Locey
Dustin James Locey - avatar
0
Your code is fine. You can run your code on your pc and will work just as you expect it to.
13th Dec 2018, 8:17 PM
Mukul
Mukul - avatar
0
Have you installed jdk in your pc?
13th Dec 2018, 8:20 PM
Mukul
Mukul - avatar
0
You can use command line or an ide whatever you prefer. Do you have any ide?
13th Dec 2018, 8:22 PM
Mukul
Mukul - avatar
0
You can use command line or an ide whatever you prefer. Do you have any ide?
13th Dec 2018, 8:22 PM
Mukul
Mukul - avatar
0
Bro dm me
13th Dec 2018, 8:25 PM
Mukul
Mukul - avatar
0
Follow these steps to run your code in command line. 1. Write your code in a text file and save it with .java extension and save . 2. Now set the path of command line to the directory in which you have saved your file. 3. Write this code in commnd line. javac filename. java. 4. Now write . java filename. Your code should run. In the above instructions filename is the name by which you have saved your java file. In the steps mentioned above. I am expecting you to know how to change working directory in command line.
13th Dec 2018, 8:34 PM
Mukul
Mukul - avatar
0
If you still have any doubt feel free to contact me
13th Dec 2018, 8:36 PM
Mukul
Mukul - avatar