Java程序员认证考试_第1页
Java程序员认证考试_第2页
Java程序员认证考试_第3页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、第10页 共10第10页 共10页Java 程序员认证考试SUN 认证SUNSunJavaSolaris以证明个人的技术能力。1.JavaJavaSunJavaJavaSunJava65以上的选择题,时间大约为 90 分钟。目前在这方面有两项认证:Sun Certified Java Programmer(SCJP)和 Sun Certified Java Developer(SCJD)。SCJP测验Java程序设计概念及能力,内容偏重于Java语法及JDK的内容;SCJD则进一步测试用Java开发应用程序的能力,考试者必须先成一个程序的设计方案,再回答与此方案相关的一些问题。2. Solar

2、is 系统管理认证考试Solaris/Sun OS,SunCertified Solaris Administrator(CSA)。CSA(Part 和 PartSolaris3. Solaris 网络管理认证考试Solaris,SunCertified Administrator(CNA)。内容包括基本网络概念、Routing and Subnet、Security、Performance、DNS、NIS+等。SUNSunMicrosystemsSun技术能力的肯定。SUN JAVA 程序员认证考试大纲Basic Object Oriented ConceptObjectAn instanc

3、e of a class Has state and behaviorState is contained in its member variables Behavior is implemented through its methods. MessageFor objects to interact with one anotherResult of a message is a method invocation which performs or modifies the state of the receiving objectClassesAn objects class is

4、the objects typeThe ability to derive one class from another and inherit its state and behaviorMost general classes appear higher in the class hierarchy Most specific classes appear lower in the class hierarchy Subclasses inherit state and behavior from their InterfaceA collection of method definiti

5、ons without actual implementations For defining a protocol of behavior that can be implemented byany class anywhere in the class hierarchy.PackagesA collection of related classes and interfaces java.lang is imported by default automatically Java Language FundamentalsThe order for every heading is as

6、 follows:package declarations - package my.applications.uinterfaces; import statements - import java.awt.某class definitions - public class myClass Order of public vs. non-public class definitions doesnt matter. Allows only one top-level public class per source fileName of source file must be the sam

7、e as name of the public class main() method must be:public staticNot return a value (void return type)Take an array of strings:(String args) or (String args) doesnt matterargs is just a common name, you can use any name you like.However, there must be a set ofLegal eamples:public static void main(St

8、ring args) static public void main(String args)Command line arguments are placed in the String array starting at0 after the java command and the program nameFor 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 sub

9、class of Container init() - called when applet is first instantiated.start() - called when the web page containing the applet is to be displayedstop() - called when the web browser is about to show another web page and quit the current oneHTML required to display an applet in a web page: PARAM tag a

10、llows you to pass a value to an applet:To use these values in your applet, use the getParameter(Stringparamname ) method to return the value as a string: greeting=getParameter(message);Java IdentifierConsists of letters and digitsMust begin with a letter , $ or _ Unlimited lengthCannot be the same a

11、s a reserved keyword Java Reserved WordReserved Keywords cover categories such as primitive types, flow control statements, access modifiers, class, method, and variable declarations, special constants, and unused wordsabstract - boolean - break - byte - case - catch - char - class -const -continue

12、- default - do -double - else - etends - 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 -

13、 void - volatile - whileTrue, false and null are literals, not keywords PrimitivesOccupy pre-defined numbers of bits Have standard implicit initial values Type conversionYou cannot assign booleans to any other type. You cannot assign a byte to a char.You can assign a variable of type 某 to type Y onl

14、y if Y contains a wider range of values than 某.Primitives in order of width are char/short, int, long, float,double.For Objects, you can assign object 某 to object Y only if are of the same class, or 某 is a subclass of Y, which is called upcasting.PromotionIn arithmetic operations, variable may be wi

15、dened for the purpose of evaluating the epressionThe variables themselves would not be changed, but for its calculations Java uses a widened value.CastingSimilar to forcing a type conversion - values can be casted between different primitive typesDone by placing the destination cast type keyword par

16、entheses before the source type epressionSome cast operations may result in loss of informationVariables 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 stoppedMaj

17、or primitive types: Primitive TypeSizeRange of Byte8 bit-27 to 27-1Short16 bit-215 to 215-1Int32 bit, all are signed-231 to 231-1Long64 bit-263 to 2 63-1Char16 bit unicode/u0000 to (0 to 216-1 )Java unicode escape format: a /u followed by four hedigits. e.g.,char 某=/u1234Other primitive types:Long -

18、 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 DBooleans - true or false only, cannot be cast to or from other typesArray - declared using the square brackets . Eample legal declarations :intintint i; declares a two dimensi

19、onal array.Can be created dynamically using the new keywordCan be created statically using an eplicit element listArray element counts from 0. For eample, int10 actually has10 elements, from 0 to 9, not from 1 to 10Array can be constructed after declaration, or to have everything done on the single

20、lineint i;i = new int10;ORint i = new int10;Array members can be initialized either through a FOR loop, through direct assignmentint myarray = new for(int j=0; jmyarrayj=j; ORchar mychar= new char a,e,i,o,u;Do not get confused with string. Strings are implemented using the String and StringBuffer cl

21、asses.Bitwise Operationnumerics can be manipulated at the bit level using the shift and bitwise operatorsJava includes two separate shift-right operators for signed unsigned operations, the and the performs a signed right-shift. If the first bit on the left 1, then when it right-shifts the bits, it

22、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.less than, =less than or e

23、qual to, =Logical Operators logical AND, & logical OR, | logical 某 OR,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 eset with parentheses ().Multiple operators

24、 of the same precedence are evaluated from left to rightIn logical boolean epressions, the right operand is evaluated after the left hand operand has been evaluated For short-circuit logical e 某 pression, if the left hand condition does not evaluate to true, the right hand condition will not be eval

25、uated at allFor Objects, = determines whether the variables reference the same object in memory, rather than comparing their contents.For eample, String 某 = 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 k

26、eyword so that string某 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 privateAccessible only from inside the class Cannot be

27、inherited by subclasses protectedAccessible only by classes in the same package or subclasses this classpublicCan be accessed by staticBelongs to the class, not to any particular instance of the class For variables, there is only one copy for all instances of theclass. If an instance changes the val

28、ue, the other instances see that changesFor 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 classMethods ofthe inner classcannot refer to instance variables orme

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论