Programming Languages, Java, Software Development, Software Engineering, Software Architecture.
an import statement to the class just to declare a variable. Using ‘var’ allows us to avoid such imports. In the example below, we won’t need to import the InputStream class when using ‘var’. InputStream inputStream = new FileInputStream("..."); var inputStreamWithVar = new FileInputStream("...");