+ 14
Like if you hate Scanner Inputs in Playground đ
Playground Scanner inputs don't show the question or statement to be answered. I think this is a glitch that requires immediate attention by the developers. End of Rant. đ https://code.sololearn.com/cwY728uh0mQF/?ref=app The Scanner receives a String. So, feel free to type anything there.
11 Respostas
+ 15
It's hardly a glitch, though. It's C.Playground incompetency in simulating console apps. (which is probably worse than a glitch)
+ 17
@Tusiime Mobile. There is no bug, so it should run anywhere ^^ But it didn't at the playground on my device.
+ 16
@Tusiime
I just removed all the comments from your code and then it runs:
import java.util.*;
public class TestInput {
public TestInput() {
String success;
Scanner input = new Scanner(System.in);
System.out.println("Type anything:");
success=input.nextLine();
System.out.print("\nCongratulations!\n" +
"You typed: "+success);
}
public static void main(String[] args) {
TestInput print=new TestInput();
}
}
+ 15
Well, we suffer from it... However, the codes are send to the SoloLearn servers to be compiled and then the output is sent back. If we had something like output, input, output again input... It would be necessary to transmit the code and receive the result a several times. That might be the reason they don't implement it.
Related post:
https://www.sololearn.com/discuss/217079/?ref=app
+ 14
Yep I agree you have to read the code to know what to input...
+ 14
@Ace Playground's out of order when I ran his code including all the comments. An error occurred - no more information. Tried it several times. No problems in my ide. He deleted the comments now and I didn't take a screenshot -.-
+ 12
It's definitely annoying, but I think it is also good. I have this feeling that most people don't even read into the code before they run it. So they run it blind and don't actually learn from it. Of course that's just my opinion. But like @Tashi N said, it would be hard for them, and honestly us, to have any kind of bandwidth for sending and receiving the info like we run it on our own PC/laptop. Bandwidth can only hold data in a single packet or over multiple packets, the computer who is trying to receive that can only receive those packets from the sender. It can process packets while receiving them, but if it tried to send them back to the sender (most likely using the same network connection) there would be a back up and packets would be lost. Which means day would be lost. For a better understanding you should take a look into Socket programming and networking. I know when I started learning that stuff I was pretty into what it was all about. Pretty much the entire infrastructure of the internet is thanks to Socketing.
+ 7
Why is Playground against good programming practices?! đ
Codes without comments don't attract learning eyes.
I've just removed all comments from all of my codes and they're now running.
This is unfortunate.
+ 7
@Ace, That's right.
Playground is allergic to comments.
+ 6
@Tashi N, are you on mobile or web?!
I have a feeling web should run it fine.