All Iterators in a Nutshell
Enumeration Iterator ListIterator Arrays foreach Collections foreach Enumeration vs Iterator Iterator vs ListIterator
Enumeration Iterator ListIterator Arrays foreach Collections foreach Enumeration vs Iterator Iterator vs ListIterator
1. Difference between skip() and seek() 2. Java Number Formatting 3. How RadomAccessFile is different from other streams? 4. Can you retrieve a disk file metadata from Java program? 5. StringTokenizer vs StreamTokenizer 6. Observer vs Observable 7. Timer vs TimerTask 8. final finally finalize 9. Frame Position 10. Generating random colors 11. static vs …
Every language supports both input (like scanf()) and output (like printf()). Java supports two types of input (from command-prompt and from GUI) and two types of output (at command prompt and at GUI). The statements System.in System.out are of Java for command-prompt. System.in is used to take input from command prompt and System.out is used …
1. Why Java introduced StringBuilder with the same functionality (usage) of StringBuffer? 2. Why split() method was introduced when Java has already StringTokenizer?Ans: StringTokenizer comes with JDK1.0 version where as split() method comes with JDK1.4 version. StringTokenizer beongs to java.util package and split() is defined in String class of java.lang package. One major difference is, …
1. Can you code like this? System.out.println(pow(2,4)); // Math class is not written instead of traditional System.out.println(Math.pow(2,4)); // Math is written Ans: Yes, it is possible from JDK1.5 version with a new feature known as static imports. 2. Can you use C-lang printf() in Java with all %d and %s etc options.? Ans: Yes, it …
1. Why java.awt.event package is to be imported when java.awt is already imported. Does java.awt not include java.awt.event also? 2. How many ways you can do scanf in Java? 3. Can a string be converted to byte, short, int, long, float, double, char and boolean? 4. What is instanceof keyword? 5. Why the methods of …
1. How many ways you can copy one object properties to another? Ans: 3 ways – Shallow copying, Deep copying and Cloning. 2. How many types of inner classes exist? Ans: 4 types. 3. What are JAR files? Ans: JAR file is a zipped file zipped by JVM. 4. How to convert a string into …
Java comes with many classes grouped as categories. A group gives common properties. A few groups are given below. 1. Wrapper classes 2. Listeners 3. Adapters 4. Layout managers 5. Byte streams 6. Character streams 7. Print streams 8. Filter streams 9. Wrapper streams 10. Components 11. Containers 12. Thread groups 13. Exceptions For different …
Java comes with many classes grouped as categories Read More »
1. A frame can be created without a border. 2. Coffee cup on the frame title bar can be changed with your photo. 3. Size of the button depends on the layout manager you choose. 4. The space along the border of the frame and components inside can be adjusted. 5. Freelance drawing using AWT. …
A. Other applet related topics 1. Life Cycle of Applet 2. Drawing Strings & Graphics 3. Reading HTML <param> Tag in Applet Example 4. Images & Audio Clips 5. HTML to Applet & Inter-Applet Communication 6. Banner, Applet cum Application B. For Applet graphics and GUI 1. Drawing Polygons 2. Drawing Circles 3. Button Applet …
AWT includes many components where a novice confuses a lot. For him, it is like in a deep forest without compass. To have all components at a single place and to focus on special programs, this topic is meant. Check out All AWT Components – At a Glance Frame Closing – 4 Styles Using WindowListener …
To display a component, it is inevitable to add it to a container. Container is an area on the monitor that can hold and display the components. The frequently used containers are Frame and Panel; the less used and restricted to browser applications is Applet. To place a component inside a container, there exist two …