Java IO : Contoh System.out + System.error

Oleh : Reza Ervani

بسم الله الرحمن الرحيم

Berikut adalah contoh sederhana penggunaan  System.out dan System.err:

try {
  InputStream input = new FileInputStream("/home/rezaervani/Documents/data/");
  System.out.println("File dibuka...");

} catch (IOException e){
  System.err.println("Pembukaan file gagal :");
  e.printStackTrace();
}

About Reza Ervani 387 Articles
Adalah pendiri programming.rezaervani.com -

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.