0

System.out.println("ok") meaning?

The code class System: def __init__(selfself,x): self.x=x class out: def println(other): print(other) try: System.out.println("ok") except: print("no") I am not sure what is the meaning of System.out.println("ok) in the first part the constructor __init__ is defining the x Can you explain the code below what function is doing?

6th Jan 2020, 5:56 PM
THEGreatGatsby
THEGreatGatsby - avatar
3 odpowiedzi
+ 3
System.out.println() is from java. println() prints stuff. System.out.println("hello"); //output: hello By creating a class System you get the effect that you can use java syntax inside python.
6th Jan 2020, 6:52 PM
Denise Roßberg
Denise Roßberg - avatar
6th Jan 2020, 7:20 PM
Denise Roßberg
Denise Roßberg - avatar
0
why in our case the output is - no , instead of ok?
6th Jan 2020, 7:04 PM
THEGreatGatsby
THEGreatGatsby - avatar