Category Archives: Java

Java Scanner Class – How to import it and use it in Java

Scanner is a class which is present in java.util package. It is used for receiving input from user. It takes the input from user into tokens. We convert those tokens into required types using nextXYZ() methods. (Here XYZ can be int, long etc). How to take input from user in Java using Scanner class? Here… Read More »

Difference between Swing and AWT in Java – AWT vs Swing

Major differences between Swing and AWT AWT Swing AWT stands for Abstract Window Toolkit AWT is the foundation of Swing and it implements GUI components which was built on AWT. AWT GUI components are heavy weight. Swing components are light weight. AWT consumes comparatively high System Resources than Swing. Swing consumes less System Resources. AWT produces… Read More »