![]() What is the return type of delete method in StringBuffer ?Ĭan a main() method of class be invoked in another class? Instanceof operator with variable having null value, it returns false The instanceof is also known as type comparison operator because it compares the instance with type. Instanceof operator is used to check whether the object is an instance of the class or subclass or interface. What is the difference between frame work and api? It has its own name, a return type (which may be void), and is invoked using the dot operator. It has the same name as the class itself, has no return type, and is invoked using the new operator.Ī method is an ordinary member function of a class. What difference between constructor and method?Ī constructor is a member function of a class that is used to create objects of that class. ![]() They usually provide improved performance when executing large numbers of asynchronous tasks, due to reduced per-task invocation overhead, and they provide a means of bounding and managing the resources, including threads, consumed when executing a collection of tasks.Įach ThreadPoolExecutor also maintains some basic statistics, such as the number of completed tasks. Thread pools address two different problems :. ThreadPools are useful when you need to limit the number of threads running in your application. Use the GridBagLayout when you need tabular layouts (or layouts that can be thought of as matrices) and when it is important to specify the resizing behavior of each component. ![]() The GridBagLayout class is a flexible layout manager that aligns components vertically and horizontally, without requiring that the components be of the same size.Įach GridBagLayout object maintains a dynamic, rectangular grid of cells, with each component occupying one or more cells, called its display area.GridLayout has the constructors :GridLayout(int rows, int cols) and GridLayout(int rows, int cols, int hgap, int vgap)The major difference between GridLayout and GridBagLayout is that GrigBagLayout supports components of different sizes, and you can specify layout options for each component. COREJAVA Interview Questions And Answers What is the difference between GridLayout and GridBagLayout? GridLayout class puts all the components in a rectangular grid and is divided into an equal sized rectangles and each component is placed inside a rectangle.
0 Comments
Leave a Reply. |