Java
T
point
Home
Python
Java
JavaScript
HTML
SQL
PHP
C#
C++
DS
Aptitude
Reasoning
Selenium
DBMS
C
Android
Interview Q
Content Menu ▼
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Question 1
:
import java.io.*;
public class Talk {
public static void main(String[] args) {
Console c = new Console();
String pw;
System.out.print("password: ");
pw = c.readLine();
System.out.println("got " + pw);
}
}
If the user types the password aiko when prompted, what is the result?
1.
password:
got
2.
password:
got aiko
3.
password: aiko
got aiko
4.
Compilation fails due to an error on line 8.