Questions on Java Collection

Good Essays
Topics:
Java Collection Interview Questions

Q: | What is the Collections API? | A: | The Collections API is a set of classes and interfaces that support operations on collections of objects. | Q: | What is the List interface? | A: | The List interface provides support for ordered collections of objects. | Q: | What is the Vector class? | A: | The Vector class provides the capability to implement a growable array of objects. | Q: | What is an Iterator interface? | A: | The Iterator interface is used to step through the elements of a Collection . | Q: | Which java.util classes and interfaces support event handling? | A: | The EventObject class and the EventListener interface support event processing. | Q: | What is the GregorianCalendar class? | A: | The GregorianCalendar provides support for traditional Western calendars | Q: | What is the Locale class? | A: | The Locale class is used to tailor program output to the conventions of a particular geographic, political, or cultural region . | | | |

Q: | What is the SimpleTimeZone class? | A: | The SimpleTimeZone class provides support for a Gregorian calendar . | | | |

Q: | What is the Map interface? | A: | The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with values. | | | |

Q: | What is the highest-level event class of the event-delegation model? | A: | The java.util.EventObject class is the highest-level class in the event-delegation class hierarchy. | | | |

Q: | What is the Collection interface? | A: | The Collection interface provides support for the implementation of a mathematical bag - an unordered collection of objects that may contain duplicates. | | | |

Q: | What is the Set interface? | A: | The Set interface provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements. | | | |

Q: | What is the typical use of Hashtable? | A: |

You May Also Find These Documents Helpful

  • Good Essays

    Java Programming Questions

    • 1971 Words
    • 8 Pages

    BSIT 4P B.Sc.(IT) 4th Semester Practical Question Paper Set (Give any one set to each student randomly) Set- 1 Write a program to print “ Welcome to Java Programming” on the screen public class welcome { public static void main (String args[]) { System.out.println("Welcome to Java programming"); } } Using a case statement, write a shell program to read a command (eg., who, cal, ls, ps) from the user and execute it. echo "let me know what you want to do" while…

    • 1971 Words
    • 8 Pages
    Good Essays
  • Good Essays

    Java Tutorial Questions

    • 3113 Words
    • 13 Pages

    Tutorial 1 - Calculation 1. What are the values of the following expression? (a) 6 / 3 * 7 (b) 7 * 6 / 3 (c) 28 / 5 (d) 16 % 2 (e) 28 % 5 (f) 28 % 3 * 5 + 1 (g) 20 / (4 + 1) (h) 18 / 2 + 14 / 2 2. What is the value of each of the following boolean expression? (a) 4 >1 (b) 5 <= 15 (c) 43 <= 43 (d) 2 = = 3 (e) 2 + 5 = = 7 (f) 3 + 8 < = 10 (g) 3 != 9 (h) 13 ! = 13 (i) -4 ! = 4…

    • 3113 Words
    • 13 Pages
    Good Essays
  • Better Essays

    things: first, a set of objects and second the way they interact with each other. Computation in this paradigm is viewed as the simulation of real world entities. The popular programming languages in this paradigm are C++, Simula, Smalltalk and Java Object Oriented programming: The world is Object Oriented, and Object Oriented programming expresses programs in the ways that model how people perceive the world. Figure 2 shows different real world objects around us which we often use for performing…

    • 4099 Words
    • 17 Pages
    Better Essays
  • Good Essays

    Java

    • 34590 Words
    • 158 Pages

    Java 2 ™ FOR DUMmIES ‰ 2ND by Barry Burd EDITION Java 2 For Dummies, 2nd Edition Published by Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774 Copyright © 2004 by Wiley Publishing, Inc., Indianapolis, Indiana Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying…

    • 34590 Words
    • 158 Pages
    Good Essays
  • Good Essays

    Java

    • 5076 Words
    • 21 Pages

    Java Software Solutions: Foundations of Program Design, 6e (Lewis/Loftus) Chapter 1 Introduction Multiple-Choice Questions 1) A Java program is best classified as A) hardware B) software C) storage D) processor E) input Answer: B Explanation: B) Programs are classified as software to differentiate them from the mechanisms of the computer (hardware). Storage and the processor are two forms of hardware while input is the information that the program processes. 2) 6 bits can be…

    • 5076 Words
    • 21 Pages
    Good Essays
  • Powerful Essays

    Java Web development interview questions 1. Can we use the constructor, instead of init(), to initialize servlet? - Yes , of course you can use the constructor instead of init(). There’s nothing to stop you. But you shouldn’t. The original reason for init() was that ancient versions of Java couldn’t dynamically invoke constructors with arguments, so there was no way to give the constructur a ServletConfig. That no longer applies, but servlet containers still will only call your no-arg constructor…

    • 34626 Words
    • 139 Pages
    Powerful Essays
  • Satisfactory Essays

    Java

    • 1218 Words
    • 5 Pages

    without any errors. . Copyright Reserved. Mohd Fadzli Marhusin. 3 Computer Instruction : Cont’ You write a computer program using a high-level programming language, e.g. java. The java compiler and interpreter responsible to converting the code you write into form of on and off switches. When you execute a java program, the program is run within a contained environment…

    • 1218 Words
    • 5 Pages
    Satisfactory Essays
  • Powerful Essays

    Java

    • 3153 Words
    • 13 Pages

    subject matter, subject landscape, or even world view. This transformation may be sudden or it may be protracted over a considerable period, with the transition to understanding proving troublesome ” (H.F. Meyer and R Land, 2006, p.3). An example in Java programming, the array is the accepted standard to store more than one variable, it is virtually practised universally. But the concept, when grasped, tends to be “ritual knowledge” (Perkins 1999). It doesn’t have to be understood, one just has…

    • 3153 Words
    • 13 Pages
    Powerful Essays
  • Good Essays

    Java

    • 827 Words
    • 4 Pages

    Java Problems SEQUENCE PROBLEMS: 1. Create a Java program that will print the sum of two integers. 2. Print the sum and product of three integers. 3. Print the perimeter and area of a rectangle. 4. Given the number of a baseball team’s wins and losses, compute its winning percentage. Assume that there are no ties. 5. Input the number of a team’s wins, losses, and ties, and print its winning percentage. Assume that a tie game counts as a full game played and a half-game won. 6. Given the…

    • 827 Words
    • 4 Pages
    Good Essays
  • Better Essays

    JAVA

    • 956 Words
    • 4 Pages

    called Java and eventually in 1994 after the failure of Interactive TV Java project team switched their focus to the web. On May 23rd 1995 the director of Sun Microsystems along with co-founder and executive vice president Netscape announced to the world about the Java. There is only 30 pepole team when java was started. Development of java has taken step by step process. There are many versions in Java like Versions 1.0 and 1.1 are the initial release of Java. Java 2 (Version 1.2), Kestrel (Java 1.3)…

    • 956 Words
    • 4 Pages
    Better Essays