This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

read file pullzed  RSS feed

eastjy eastjy
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
class ReadFile
public static void main(String args[]) throws Exception
//String ss="d:\\Temp\\";
//File readFile = new File(ss);
StringBuffer stfDir = new StringBuffer();
char ch = (char);
while( ch != '\n')
ch = (char);
String ss = stfDir.toString();
File readFile = new File( ss );
if( readFile.isFile() &&readFile.canWrite() && eadFile.canRead())
RandomAccessFile rafFile =
new RandomAccessFile(readFile,"rw");
System.out.println("File cannot be read!");
run input d:\temp\ file exists),the result is: File cannot be read!
but this file compile and run in JBuilder,the result is OK.
and I use the sentence which is commented,the result is right not only in JBuilder but JDK self.
another is the sentense list underside in java is not be allowed??
while(char ch = (char)!='\n')
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!