27th Dec 2017, 2:44 PM
MINALI KRIPLANI
MINALI KRIPLANI - avatar
12 Answers
+ 8
Unfortunately, the code playground doesn't support swing or any other GUI library. You can take the input using the Scanner class instead. https://www.sololearn.com/learn/Java/2220/
27th Dec 2017, 2:52 PM
Dev
Dev - avatar
+ 7
@MINALI: Edited the previous answer, have a look.
27th Dec 2017, 2:56 PM
Dev
Dev - avatar
+ 6
@MINALI: You might have not updated the app to the latest version in that case.
27th Dec 2017, 4:33 PM
Dev
Dev - avatar
+ 6
@Dev how is it that I can't find these lessons in the learn section
27th Dec 2017, 4:47 PM
David Akhihiero
David Akhihiero - avatar
+ 6
These are from the Java course, they can now be shared anywhere. It came with the latest update FYI.
27th Dec 2017, 5:18 PM
Dev
Dev - avatar
+ 5
@MINALI: For instance, here's what you should do to make it work: import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int x,y,z; x = scanner.nextInt(); y = scanner.nextInt(); z=((x*x)+(y*y)); System.out.print(z); } }
27th Dec 2017, 4:38 PM
Dev
Dev - avatar
+ 3
Your code couldn't be run I think
27th Dec 2017, 2:51 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 3
So what should I do?? actually it doesn't support JOptionPane class as well
27th Dec 2017, 2:53 PM
MINALI KRIPLANI
MINALI KRIPLANI - avatar
+ 3
Although Thank uhh @Dev
27th Dec 2017, 4:35 PM
MINALI KRIPLANI
MINALI KRIPLANI - avatar
+ 3
@Dev Thank uhhh soooooo much 😇
27th Dec 2017, 4:39 PM
MINALI KRIPLANI
MINALI KRIPLANI - avatar
+ 2
@Dev Actually it's not opening, will u plzz send the code again!
27th Dec 2017, 3:02 PM
MINALI KRIPLANI
MINALI KRIPLANI - avatar
+ 2
@Yerucham exactly scanner topic isn't there
27th Dec 2017, 4:49 PM
MINALI KRIPLANI
MINALI KRIPLANI - avatar