This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why doesnt compile?  RSS feed

 
Nil. Hatamova
Ranch Hand
Posts: 32
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This code gives compile error. But i cant find why?

 
Tim Cooke
Marshal
Posts: 3698
187
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What compile error?
 
Roel De Nijs
Sheriff
Posts: 11077
173
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nil. Hatamova wrote:This code gives compile error. But i cant find why?

If you have the appropriate import statement, that code snippet should compile without any errors. The FileNotFoundException resides in the java.io package (not in the java.lang package) and therefore an explicit import statement is required.

Hope it helps!
Kind regards,
Roel
 
fred rosenberger
lowercase baba
Bartender
Posts: 12464
43
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you compile a file in java, it tells you EXACTLY why it won't compile. Those error messages mean something. At the very least, you should post it here, and we can help you learn tow to read and interpret them.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!