You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _moreReadMe/input_output/README.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -187,16 +187,16 @@ public class fileStreamTest {
187
187
The Java Console class is be used to get input from console. It provides methods to read texts and passwords. If you read password using Console class, it will not be displayed to the user. The java.io.Console class is attached with system console internally.
188
188
**Example :**
189
189
```java
190
-
importjava.io.Console;
191
-
classReadPasswordTest{
192
-
publicstaticvoidmain(Stringargs[]){
193
-
Console c=System.console();
194
-
System.out.println("Enter password: ");
195
-
char[] ch=c.readPassword();
196
-
String pass=String.valueOf(ch);//converting char array into string
197
-
System.out.println("Password is: "+pass);
198
-
}
199
-
}
190
+
importjava.io.Console;
191
+
classReadPasswordTest {
192
+
publicstaticvoidmain(Stringargs[]) {
193
+
Console c=System.console();
194
+
System.out.println("Enter password: ");
195
+
char[] ch=c.readPassword();
196
+
String pass=String.valueOf(ch);//converting char array into string
0 commit comments