The VB 'Using' statement is a shortcut for a Try/Finally block which disposes an object of type System.IDisposable. Java 7 introduces the 'try with resources' statement, which operates on objects of type java.io.Closeable:
Using f As New Foo()
Java 7 or higher:
try (Foo f = new Foo())
Foo f = new Foo();
Use VB to Java Converter to convert from VB to Java.
VB.NET and Java Equivalents
Copyright © 1997 – 2017 Tangible Software Solutions Inc.