Java程序员认证考试

来源:文书网 5.35K

Sun Java认证分为两个级别:Sun 认证Java程序员和Sun 认证Java开发员。下面是小编整理的关于Java程序员认证考试,希望大家认真阅读!

Java程序员认证考试

  SUN认证

SUN认证是给网络设计界建立的一套认证标准,Sun公司推出了Java以及Solaris技术认证方案。对于企业而言,可以借助这项认证作为招聘人才的.评判标准,或是作为衡量员工技术水准的依据;在个人方面,通过这些认证也可以证明个人的技术能力。

认证考试   该认证主要面对Java程序员。同时,该认证是业界唯一经Sun授权的Java认证,考试内容涉及所有Java相关知识、编程概念及applet开发技巧。Sun认证Java程序员考试旨在观察您通过应用软件分配进行复杂编程的能力,之后还要测试您完成编程所需的知识。每次考试都包括65道以上的选择题,时间大约为90分钟。目前在这方面有两项认证:Sun Certified Java Programmer(SCJP)和 Sun Certified Java Developer

(SCJD)。SCJP测验Java程序设计概念及能力,内容偏重于Java语法及JDK的内容;SCJD则进一步测试用Java开发应用程序的能力,考试者必须先完成一个程序的设计方案,再回答与此方案相关的一些问题。   2. Solaris系统管理认证考试

对Solaris/Sun OS系统管理员,Sun推出Certified Solaris Administrator(CSA)。CSA分别为两个等级(Part Ⅰ和 Part Ⅱ),测试对Solaris系统管理的了解程度。

3. Solaris网络管理认证考试

为了测试使用者对于Solaris网络管理能力,Sun推出Certified Network Administrator(CNA)。内容包括基本网络概念、Routing and Subnet、Security、Performance、DNS、NIS+等。

通过SUN任何一门专业认证后,考生将收到SunMicrosystems总公司寄发的资格证书及徽章,并有权将通过Sun认证的标记印在个人名片上,作为个人技术能力的肯定。

  SUN JAVA程序员认证考试大纲

Basic Object Oriented Concept

Object

An instance of a class

Has state and behavior

State is contained in its member variables

Behavior is implemented through its methods.

Message

For objects to interact with one another

Result of a message is a method invocation which performs actions or modifies the state of the receiving object

Classes

An object`s class is the object`s type

The ability to derive one class from another and inherit its state and behavior

Most general classes appear higher in the class hierarchy

Most specific classes appear lower in the class hierarchy

Subclasses inherit state and behavior from their superclasses

Interface

A collection of method definitions without actual implementations

For defining a protocol of behavior that can be implemented by any class anywhere in the class hierarchy.

Packages

A collection of related classes and interfaces

is imported by default automatically

Java Language Fundamentals

The order for every "heading" is as follows:

package declarations -- package erfaces;

import statements -- import .*

class definitions -- public class myClass { .....

Order of public vs. non-public class definitions doesn`t matter.

Allows only one top-level public class per source file

Name of source file must be the same as name of the public class

main() method must be:

public

static

Not return a value (void return type)

Take an array of strings:(String[] args) or (String args[]) doesn`t matter

`args` is just a common name, you can use any name you like. However, there must be a set of "[]"

Legal examples:

public static void main(String[] args)

static public void main(String args[])

Command line arguments are placed in the String array starting at 0 after the java command and the program name

For non-applet java application, there must be a main method

For applet, you do not use main()

Applet:

a subclass of Panel, which itself is a subclass of Container

init() - called when applet is first instantiated.

start() - called when the web page containing the applet is to be displayed

stop() - called when the web browser is about to show another web page and quit the current one

HTML required to display an applet in a web page:

PARAM tag allows you to pass a value to an applet:

To use these values in your applet, use the getParameter(String paramname ) method to return the value as a string:

greeting=getParameter("message");

Java Identifier

Consists of letters and digits

Must begin with a letter , "$" or "_"

Unlimited length

Cannot be the same as a reserved keyword

Java Reserved Word

Reserved Keywords cover categories such as primitive types, flow control statements, access modifiers, class, method, and variable declarations, special constants, and unused words

abstract - boolean - break - byte - case - catch - char - class - const - continue - default - do - double - else - extends - final - finally - float - for - goto - if - implements - import - instanceof - int - interface - long - native - new - null - package - private - protected - public - return - short - static - super - switch - synchronized - this - throw - throws - transient - try - void - volatile - while

True, false and null are literals, not keywords

Primitives

Occupy pre-defined numbers of bits

Have standard implicit initial values

Type conversion

You cannot assign booleans to any other type.

You cannot assign a byte to a char.

You can assign a variable of type X to type Y only if Y contains a wider range of values than X.

Primitives in order of `width` are char/short, int, long, float, double.

For Objects, you can assign object X to object Y only if they are of the same class, or X is a subclass of Y, which is called "upcasting".

Promotion

In arithmetic operations, variable may be widened automatically for the purpose of evaluating the expression

The variables themselves would not be changed, but for its calculations Java uses a widened value.

Casting

Similar to forcing a type conversion - values can be casted between different primitive types

Done by placing the destination cast type keyword between parentheses before the source type expression

Some cast operations may result in loss of information

Variables derived from these primitive types that are declared in nested blocks could only be accessible within that block and its sub-blocks, and are destroyed when the block they belong to is stopped

Major primitive types:

Primitive Type

Size

Range of Values

Byte

8 bit

-27 to 27-1

Short

16 bit

-215 to 215-1

Int

32 bit, all are signed

-231 to 231-1

Long

64 bit

-263 to 2 63-1

Char

16 bit unicode

`/u0000` to `/uffff`

(0 to 216-1 )

Java unicode escape format: a "/u" followed by four hexadecimal digits. e.g.,

char x=`/u1234`

Other primitive types:

Long - can be denoted by a trailing "l" or "L"

Float - can be denoted by a trailing "f" or "F"

Double - can be denoted by a trailing "d" or "D"

Booleans - true or false only, cannot be cast to or from other types

Array - declared using the square brackets "[]". Example of legal declarations :

int[] x;

int x[];

int i[][]; declares a two dimensional array.

Can be created dynamically using the new keyword

Can be created statically using an explicit element list

Array element counts from 0. For example, int[10] actually has 10 elements, from 0 to 9, not from 1 to 10

Array can be constructed after declaration, or to have everything done on the single line

int[] i;

i = new int[10];

OR

int i[] = new int[10];

Array members can be initialized either through a FOR loop, or through direct assignment

int myarray[] = new int[10];

for(int j=0; j

myarray[j]=j;

}

OR

char mychar[]= new char[] {`a`,`e`,`i`,`o`,`u`};

Do not get confused with string. Strings are implemented using the String and StringBuffer classes.

Bitwise Operation

numerics can be manipulated at the bit level using the shift and bitwise operators

Java includes two separate shift-right operators for signed and unsigned operations, the ">>" and the ">>>"

>> performs a signed right-shift. If the first bit on the left is 1, then when it right-shifts the bits, it fills in a 1s on the left. If the leftmost bit is 0, then when it right-shifts the bits, it fills in a 0s on the left. The first bit represents the sign of a number to preserve the sign of the number.

>>> performs an unsigned right-shift. The left side is always filled with 0s.

<< performs a left-shift. The right side is always filled with 0s.

Java Operator

Operators that compare values

equal to, "=="

not equal to, "!="

greater than, ">"

less than, "<"

greater than or equal to, ">="

less than or equal to, "<="

Logical Operators

logical AND, "&"

logical OR, "|"

logical XOR, "^"

boolean NOT, "!"

short-circuit logical AND, "&&"

short-circuit logical OR, "||"

Operator precedence determines the order of evaluation when different operators are used, although precedence can be explicitly set with parentheses "()".

Multiple operators of the same precedence are evaluated from left to right

In logical boolean expressions, the right operand is only evaluated after the left hand operand has been evaluated first.

For short-circuit logical expression, if the left hand condition does not evaluate to true, the right hand condition will not be evaluated at all

For Objects, == determines whether the variables reference the same object in memory, rather than comparing their contents.

For example, when

String x = "Hey";

String y = "Hey";

Java creates only one String object, so the result of comparison is always true.

To avoid the above situation, use the NEW keyword so that string x and y can be of different objects.

In Booleans, equals() returns true if the two objects contain the same Boolean value.

In String, equals() returns true if the Strings contain the same sequence of characters.

Java Modifiers

private

Accessible only from inside the class

Cannot be inherited by subclasses

protected

Accessible only by classes in the same package or subclasses of this class

public

Can be accessed by anyone

static

Belongs to the class, not to any particular instance of the class

For variables, there is only one copy for all instances of the class. If an instance changes the value, the other instances see that changes

For methods, it can be called without having created an instance, and cannot be used the this keyword, nor be referred to instance variables and methods directly without creating an instance For inner classes, they can be instantiated without having an instance of the enclosing class

Methods of the inner class cannot refer to instance variables or methods of the enclosing class directly

final

Variable`s value cannot be changed

Methods cannot be overridden

Classes cannot be subclassed.

native

Method written in non java language

Outside the JVM in a library

Optimized for speed

abstract

Method which is not implemented with code body

synchronized

method makes non-atomic modifications to the class or instance

for static method, lock for the class is acquired before executing the method

for non-static method, a lock for the specific object instance is acquired

transient

field is not part of the object`s persistent state

should not be serialized

volatile

field may be accessed by unsynchronized threads

certain code optimizations must not be performed on it

none

class- non-public class is accessible only in its package

interface - non-public interface is accessible only in its package

member - member that is not private, protected, or public is accessible only within its package

Summary of Class Member Accessibility

热门标签