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 »

Solved – Undefined reference to ‘pthread_create’ in Linux with Explanation

When a programmer uses pthread_create function program to create threads in a C program, then he/she may receive “undefined reference to ‘pthread_create’” error. This error mainly occurs on Linux platform while compiling a C Program in G++ or GCC.   Working Solution for Undefined reference to ‘pthread_create’ error in C – Linux So the solution to this… Read More »