Resource leak. bucky is never closed >> Java video 6

0 Ric BasicJava · December 1, 2014

import java.util.Scanner;
public class paku {

    public static void main(String[] args) {
        Scanner bucky = new Scanner(System.in);
        
        
        
        System.out.println(bucky.nextLine());
        bucky.close();

    }

}



I hah put >>>> bucky.close();

but the Console never show (console can't run)....

please help me.

Post a Reply

Replies

Oldest  Newest  Rating
0 Developer John · February 17, 2015
Teemmy Ellorry, have you resolved your problem?:dizzy:
0 Ric BasicJava · December 2, 2014
resolved .... by my self thanks
0 Developer John · December 2, 2014
I know right, when I was experimenting with JOptionPane, I received a strange error when nothing was wrong with the code.. I was like, wtf m8!?:sideways:
0 Teemmy Ellorry · February 16, 2015
Please what's the solution? Am having the same problem...
  • 1

Java / Android Development

107,280 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator