top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Examples for invisisble objects in java?

+2 votes
54 views
Examples for invisisble objects in java?
posted Jan 11, 2014 by Prasad

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Not sure what you are looking into check the following example

public void run() {
    try {
        Object foo = new Object();
        foo.doSomething();
    } catch (Exception e) {
        // whatever
    }
    //  the object assigned to the variable foo will become invisible
    //  after leaving the try/catch block 
    while (true) {
         // do stuff 
    } 
}
answer Jan 11, 2014 by Tarun Singhal
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...