Shared Flashcard Set

Details

Java Core Fundamentals
Prep for UW Java Extension course.
44
Computer Science
Undergraduate 1
09/14/2008

Additional Computer Science Flashcards

 


 

Cards

Term
The 11 Java "White Paper" Buzzwords
Definition

Simple                              Interpreted

Object Oriented                 High Performance

Distributed                        Multithreaded

Robust                              Dynamic

Secure

Archecture Neutral

Portable

 

Term

What did the Java designers mean by the Buzzword "Simple"?

Definition

They wanted to build a system that could be programmed easily without a lot of esoteric training and which leverage today's standard practice. Java designed close to C++ but without the rarely used and poorly understood and confusing features of C++.

Term
Java is Object Oriented?
Definition

Object Oriented (OO) design is a technique for programming that focuses on the data (=objects) and on the interfaces to that object.  The OO facilities of Java are essentially those of C++.

Term
Java is Simple and Small?
Definition

Goal of Java is to enable creation of software that can run on small stand-alone machines. Size of basic interpreter and class support is 40K. The basic standard libraries and thread support add 175K.

Term
Java support Distributed Applications?
Definition

Has extensive library of routines coping with TCP/IP protocols like HTTP and FTP. Java applications can open and access objects across the Net vai URLs with the same ease as when accessing a local file system.

Term
What is J2EE?
Definition

Java 2 Enterprise Edition. This is a separate archecture that supports very large scale distributed applications.

Term
How is Java robust?
Definition

Intended for writing reliable programs. Java put lots of emphasis on early checking for possible problems, later dynamic (run-time) checking, and eliminating situations that are error-prone. Java unlike C++ eliminates possibility of overwritting memory and corupting data.

Term
How is Java Secure?
Definition

Java is intended to be used in networked/distributed environments. Lots of emphasis places on security by enabling the construction of virus-free, tamper-free systems.

Term
What attacks are impossible with applications written in Java?
Definition
  • Overrunning the runtime stack - common with worms and viruses.
  • Corrupting memory outside its own process space.
  • Reading or writing files without permission.
Term
Java is Architecture Neutral?
Definition

Java compiler generates an architecture-neutral object file format (bytecodes) that is used by the Java runtime system (Java Virtual Machine - JVM) to execute on many kinds of processors. Bytecodes are easily translated to native machine code by the JVM on the fly.

Term

How is Java portable?

Definition

There are no "implementation-dependent" aspects of the specification. The sizes of the primitive data types are specified, as is the behavior of arithmetic on them.

 

Example: int always 32-bits.

  •  Fixed size for number types.
  • Binary data stored and transmitted in a fixed format.
  • Strings saved in standard Unicode format.
Term
Java is an Interpreted language?
Definition

The Java interpreter can execute Java bytecodes directly on any machine to which the interpreter has been ported. Since linking is more incremental and lightweight process, the development process can be much more rapid and exploatory.

Term
When was Sun's first release of Java?
Definition

Early 1996

Term

New Java language features by version.

Definition

1.0     The language itself

1.1     Inner classes

1.2     None

1.3     None

1.4     Assertions

5.0     Generic classes, "for each" loop, varargs,

         autoboxing, metadata, enumerations, static

         import

Term
What is J2SE?
Definition

Java 2 Standard Edition

Term
What is JDK?
Definition
Java Development Kit
Term
What is J2ME
Definition
Java 2 Micro Edition.
Term
What is the Java Directory Tree?
Definition

jdk                Name might be jdk5.0

      bin          The compiler and tools.

      demo       Look here for demos.

      docs        Library documentation in HTML                        format (after expansion of 

                    j2sdkversion-doc.zip)

      include    Files for compiling native methods

      jre          Java runtime environment files

      lib          Library files

      src          The Library source (after expanding

                    src.zip).

Term
Class name requirements?
Definition
  • Must start with Capital Letter
  • File name containing class must have the same name with a .java extension.
  • Use "CamelCase" for multi-worded name.
Term
How to run a Java program whose class is named Welcome.
Definition
  • javac Welcome.java
  • java Welcome
Term

What file is created from the command:

javac Welcome.java

Definition
Welcome.class
Term
What is an IDE?
Definition

Integrated Developement Environment.

Eclipse is an example.

Term

How are braces {} used?

Definition

They mark the beginning and ending of a body of code. The body starts with { and ends with }.

Term

What are method naming requirements?

Definition
  • Must start with a lower case letter.
  • Must be "CamelCase" for multiple words.
Term
What are variable (not a constant) naming requirements?
Definition
  • First character is lower case.
  • "CamelCase" for multiple words.
Term
Name of Java Symbol
Definition

Tumbling Duke - 1994 - Used to demo applets in a browser.

Term
Original Name of Java, when created and by whom.
Definition

Oak (1990) by James Gosling

Term
Where was Java Developed?
Definition
Sun
Term
What was Java originally Developed for?
Definition

Small programable devices and appliances.

  • Language
  • Runtime Environment
Term
When was it originally Release?
Definition

1995 - Sun let Netscape use java name in javascript for letting java virtual machine in Netscape browser.

Term
What was Java's impact on the Web?
Definition

Demonstrated how to deliver executable content on the Web.

Term
Why is Java portable?
Definition

Without code modification it can run on any platform running a Java virtual machine (JVM).

Term

Method that is called to start a java program

Definition

public static void main (String[] args) {

     // Code only to start application.

}

 

Term
What are the three Pillars of Object-Oriented Programming?
Definition
  • Encapsulation
  • Inheritance
  • Polymorphism
Term
Abstraction
Definition

Abstraction is the process or result of generalization by reducing the information content of a concept or an observable phenomenon, typically in order to retain only information which is relevant for a particular purpose. For example, abstracting a leather soccer ball to a ball retains only the information on general ball attributes and behaviour. Similarly, abstracting happiness to an emotional state reduces the amount of information conveyed about the emotional state. Computer scientists use abstraction to understand and solve problems and communicate their solutions with the computer in some particular computer language.

Term
Encapsulation
Definition
  • No direct access to state of an object only through methods.
  • Information hiding is the hiding of design decisions in a computer program that are most likely to change, thus protecting other parts of the program from change if the design decision is changed. The protection involves providing a stable interface which shields the remainder of the program from the implementation (the details that are most likely to change).

 

Term
Inheritance
Definition
  • A relationshipe between two or more classes where some classes (the subclasses) are partially defined in terms of i.e, inherit the features of, other classes (the superclass).
  • Allows "differential programming", program only what differs from existing classes.
  • Make classes homogeneous - Based on similar things.

 

Term
Advantages of Inheritance
Definition
  • Allows very abstract descriptions
  • Allows a significant amount of code reuse (not the only from of reuse).
Term

Disadvantages of Inheritance

Definition
  • Places servere constraints on superclass flexibility.
  • Sensitive to order of class discovery.
  • Introduces high coupling. - Tied to parent class. Changes to parent will impact children.
Term
What type(s) of inheritance does Java allow?
Definition
  • Single inheritance
  • Interface inheritance
Term

What is single inheritance?

 

Definition

Subclasses inherit from exactly one superclass.

Term
What is Interface inheritance?
Definition
  • Refers to inheriting a set of "signatures" but no associated behavior. Defines method signatures.
  • Behavior must be implemented in the subclass.
Term
Number 1 thing you must code to in Java?
Definition

Code to the interface.

Term
Advantage of Interface inheritance?
Definition

Eliminates ambiguity associated with multiple inheritance.

Supporting users have an ad free experience!