What is a stream and what are the types of Streams and classes of the Streams

A Stream is an abstraction that either produces or consumes information. There are two types of Streams and they are: Byte Streams: Provide a convenient means for handling input and output of bytes. Character Streams: Provide a convenient means for handling input & output of characters. Byte Streams classes: Are defined by using two abstract … Read more

What is the difference between set and list?

Set stores elements in an unordered way but does not contain duplicate elements, whereas list stores elements in an ordered way but may contain duplicate elements. In Core Java, a set and a list are both interfaces in the Java Collections Framework, and they represent different types of collections with distinct characteristics. List: Ordering: Lists … Read more

What are Vector, Hashtable, LinkedList and Enumeration

Vector : The Vector class provides the capability to implement a growable array of objects. Hashtable : The Hashtable class implements a Hashtable data structure. A Hashtable indexes and stores objects in a dictionary using hash codes as the object’s keys. Hash codes are integer values that identify objects. LinkedList: Removing or inserting elements in … Read more

What are wrapper classes?-

?– Wrapper classes are classes that allow primitive types to be accessed as objects. Wrapper classes in Java are classes that provide a way to use primitive data types (such as int, char, float, etc.) as objects. In Java, everything is treated as an object, but primitive data types are not. Wrapper classes serve as … Read more

Which containers use a Flow layout as their default layout?-

Panel and Applet classes use the FlowLayout as their default layout. In Core Java, the containers that use a FlowLayout as their default layout are: JPanel JDialog The FlowLayout is a layout manager in Java Swing that arranges components from left to right, top to bottom in the order they are added. It is the … Read more