cis3145-final-review - Final Exam Review Outline Chapter 10 Packages Libraries o What is a package and how is it created A package is a way of

cis3145-final-review - Final Exam Review Outline Chapter 10...

This preview shows page 1 - 4 out of 13 pages.

Final Exam Review Outline Chapter 10 Packages & Libraries o What is a package and how is it created? A package is a way of organizing classes – allowing programmer to import just the classes and packages needed for the application. They store one or more classes or interfaces. Correspond to same named directory. Advantages are: provide logical structure, making it easier to find (1) avoids naming conflicts. To add a new package to a project, right-click on the project name or the Source Packages folder in the Projects window, select the New-+ Java Package command, and enter the name of the package in the resulting dialog box. This creates a directory, if necessary, as well as a subdirectory within that directory. o What is a library? A library is a stored set of packages made available to other applications. These are shared via JAR (or Java Archive) files . Java Documentation o How are javadoc comments created? Java doc are created by placing comments between an opening /** and closing */ - this sets all other astieriks to be ignored – allowing programmer to use asterisks to set comments apart from code.
Image of page 1
Enumerations o What are enumerations and how are they created? Enumerations are a set of related constants that define a type. Intro'd in JDK1.5. To create - code the public keyword, followed by the enum keyword, followed by the name of the enumeration. Then, within the enumeration, you code the names of one or more constants, separating each name with a comma. o What is a static import? A simplified enumeration – once coded – it imports all the constants of an enumeration or all of the static fields and methods of a class. Chapter 11 Arrays o What is an array? An array is a data structure that stores a fixed-size sequential collection of elements of the same type. o How are they declared? dataType [] arrayRefVar ; double [] myList ; o What are the methods associated with the Arrays class?
Image of page 2
The "java.util.Arrays" is the base class for arrays in Java which have many static methods for searching, sorting, comparing and filling arrays. All primitive type can be overloaded using these methods. Link to all methods o How is the Comparable interface used to make an array of user defined objects sortable? Lists (and arrays) of objects that implement the comparable interface can be sorted automatically by Collections.sort (and Arrays.sort). o Describe one and two dimensional arrays? One dimensional arrays only have one column of data []. Two dimensional arrays have [][]. Loops o Describe the “enhanced for loop”. Its simple structure allows one to simplify code by presenting for-loops that visit each element of an array/collection without explicitly expressing how one goes from element to element. for (String element : array) { System.out.println("Element: " + element); } Chapter 13 Date Processing o Describe the GregorianCalendar, Calendar, Date, and Date Format classes.
Image of page 3
Image of page 4

You've reached the end of your free preview.

Want to read all 13 pages?

  • Fall '16
  • Anonamous
  • Database management system, string class, native DBMS protocol

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes