Skip to content

Commit d5a19c1

Browse files
Update README.md
1 parent ddb30c0 commit d5a19c1

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

_moreReadMe/input_output/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,16 @@ public class fileStreamTest {
187187
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.
188188
**Example :**
189189
```java
190-
import java.io.Console;
191-
class ReadPasswordTest{
192-
public static void main(String args[]){
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+
import java.io.Console;
191+
class ReadPasswordTest {
192+
public static void main(String args[]) {
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+
}
200200
```
201201

202202

0 commit comments

Comments
 (0)