Home » Tip Bank » Java
  • Comment on this Article
Language: Java
Expertise: Intermediate
Jan 17, 2019
  • facebook
  • twitter
  • google+
  • in
  • Email

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Watch

Reading All Lines of a File from Classpath in Java 8

Reading all lines of a file from classpath in Java 8 and display on screen:

Files.lines(Paths.get(ClassLoader.getSystemResource("filename.extension")
    .toURI())).forEach(System.out::println); 
Octavia Anghel
 
Submit a Tip
Browse "Java" Tips
Browse All Tips
codeschool.com
javascriptweekly.com