+ 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?
18 Respostas
+ 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.
+ 1
Ohh, okay, if I wasnt to use sololearn for it and just writing a java program, how would I go about doing that?
+ 1
Try using your program in another app and youâll see it work just as you want.
+ 1
So I did code it right though?
+ 1
Sorry, I'm a beginner
+ 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
+ 1
Yes
+ 1
I have the eclipse ide
+ 1
I'm not sure how to do it in a command line
+ 1
I know how to open the command prompt, but idk what to input there
0
Your code is fine. You can run your code on your pc and will work just as you expect it to.
0
Have you installed jdk in your pc?
0
You can use command line or an ide whatever you prefer. Do you have any ide?
0
You can use command line or an ide whatever you prefer. Do you have any ide?
0
Bro dm me
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.
0
If you still have any doubt feel free to contact me