difference between java code and python code example
Example: python vs java
Getting input from user , python & java
JAVA:
class HelloWorld {
public static void main(String[] args) {
Scanner myObj = new Scanner(System.in); // Create a Scanner object
System.out.println("Enter username");
String userName = myObj.nextLine(); // Read user input
System.out.println("Username is: " + userName); // Output user input
}
}
PYTHON:
input = input('Enter username:')
print('Username is:', input)