Which one of the following syntaxes is the correct syntax to read from a simple text file stored in ''d:java.txt''?

Question:Which one of the following syntaxes is the correct syntax to read from a simple text file stored in ''d:java.txt''?

1.Infile = open(''d:\java.txt'', ''r'')

2.Infile = open(file=''d:\java.txt'', ''r'')

3.Infile = open(''d:java.txt'',''r'')

4. Infile = open.file(''d:\java.txt'',''r'')


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!