动态网站制作指南 [  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > Java教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Java教程 ]的信息

本月文章推荐
.Java Web Start开发指南(一).
.java访问com组件_jacob使用指南.
.数据库连接池Java实现小结.
.打破Java定律:无需创建对象--Ioc.
.Java学习路径-过程篇+书籍篇.
.JXTA 2.3.6 Beta 发布.
.toLocaleUpperCase 方法.
.Java正则表达式详解(中).
.Sun推新虚拟磁盘存储系统 容量提.
.JScript 语法错误.
.在Java中动态执行类的静态方法.
.jive中的abstract Factory.
.手机与Servlet的网络通信技巧.
.面向对象的思维方式.
.Java的测试规范.
.WirelessMessagingAPI(4).
.java工具包的安装,配置和使用.
.JAVA下的GZIP应用.
.Java设计模式之虚拟代理模式.
.彻底明白Java的多线程-实现多线程.

SCJP1.4高效率复习提纲

发表日期:2008-1-5 |



  SECTION 1: DECLARATIONS AND Access CONTROL
  1. An identifier in Java must begin with a letter, a dollar sign($), or an underscore (_); subsequent characters may be letters, dollar signs, underscores, or digits.
  2. All the keyWords in java are comprised of lower case characters only.
  3. There are three top-level elements that may appear in a file. None of these elements is required. If they are present, then they must appear in the following order:
    -package declaration
    -import statements
    -class definitions
  4. A Java source file (Java file) cannot have more than one public class, interface or combination of both.
  5. The variables in an interface are implicitly public, final and static. If the interface, itself, is declared as public the methods and variables are implicitly public.
  6. Variables cannot be synchronized.
  7. The variables in Java can have the same name as method or class.
  8. A transient variable may not be serialized.
  9. The transient keyword is applicable to variables only.
  10. The native keyword is applicable to methods only.
  11. The final keyword is applicable to methods, variables and classes.
  12. The abstract keyword is applicable to methods and classes.
  13. The static keyword is applicable to variables, methods or a block of code called static initializers.
  14. A native method cannot be abstract but it can throw exception(s).
  15. A final class cannot have abstract methods.
  16. An abstract class might not have any final methods.
  17. All methods of a final class are automatically final.
  18. Interfaces cannot be final and should not be declared abstract.
  19. The visibility of the class is not limited by the visibility of its members. I.e. A class with the entire members declared private can still be declared public.
  20. Interface methods cannot be native, static, synchronized, final, private, protected or abstract. They are implicitly public, abstract and non-static.
  21. The statement float f = 5.0; will give compilation error as default type for floating values is double and double cannot be directly assigned to float without casting. But f=5.0f is ok.
  22. A constrUCtor cannot be native, abstract, static, synchronized or final.
  23. Be careful for static and abstract keyword in the program.
  24. Also be careful for private keyword in front of a class as top level classes or interfaces cannot be private.
  25. friendly is not a java keyword. This is often used as an alternate word in java literature to indicate the default access level by placing no modifier like public, private or protected in front of members of classes and interfaces.
  26. A local variable, already declared in an enclosing block and therefore visible in a nested block, cannot be redeclared in the nested block.
  27. Array in Java can be declared and defined like ---
     int[] count = null; int []count = null; int count[] = null;
     int count[] = new int[50]; int count[] = {5,10,15,20,25}
  SECTION 2: FLOW CONTROL, ASSERTIONS, AND EXCEPTION HANDLING
  28.Three types of statements regarding flow controls are used in Java:
     * Selection statements ' if…else, switch…case, try…catch…finally
     * Iteration statement ' while, do…while, for
     * Transfer statement ' return, break, continue
  29.The argument to switch can be either byte, short, char or int. Be careful about long, float, double or boolean as argument to switch.
  30.The eXPression for an if and while statement in Java must be a boolean.
  31.Breaking to a label (using break ;) means that the loop at the label will be terminated and any outer loop will keep iterating. While a continue to a label (using continue ;) continues execution with the next iteration of the labeled loop.
  32.The if() statement in Java takes only boolean as an argument. Note that if (a = true){}, provided a is of type boolean is a valid statement then code inside the if block will be executed otherwise skipped.
  33.The (-0.0 == 0.0) will return true, while (5.0 == -5.0) will return false.
  34. An assertion is a conditional expression that should evaluate to true if and only if your code is working correctly. If the expression evaluates to false, an error is signaled. Assertions are like error checks, except that they can be turned completely off, and they have a simpler syntax.
  34.AssertionError is the immediate subclass of java.lang.Error.
  35.assert is a java keyword from JDK1.4. So it cannot be used as an identifier from JDK1.4 or later. But as other JDK versions (JDK1.3 or earlier) had no keyword named assert, an interesting backward compatibility problem arises for those programs that used assert as a java identifier.
  36.Assertion checks can be turned on and off at runtime. By default, assertion mechanism is turned off. When assertions are off, they don't use system resources.
  37.The command for compiling a source using Java's new assertion feature is javac -source 1.4 filename.java. But if -source argument is not mentioned like javac filename.java, it will be assumed like javac -source 1.3 filename.java so that existing code compiles correctly even if it uses assert as a regular identifier.
  38.Remember that Assertions can be enabled and disabled for specific packages as well as specific classes. For example, assertions can be enabled in general but disabled for a particular package.
  39.One of the most common uses of assertions is to ensure that the program remains in a consistent state. Assertions are not alternative to exception handling rather complementary mechanism to improve discipline during development phase.
  40.Assertions may be used in the situations like:
    * to enforce internal assumptions about ASPects of data structures.
    * to enforce constraints on arguments to private methods.
    * to check conditions at the end of any kind of method.
    * to check for conditional cases that should never happen.
    * to check related conditions at the start of any method.
    * to check things in the middle of a long-lived loop.
  41.Assertions may not be used in the situations like:
    * to enforce command- line usage.
    * to enforce constraints on arguments to public methods.
    * to enforce public usage patterns or protocols.
    * to enforce a property of a piece of user supplied information.
    * as a shorthand for if ( something) error();
    * as an externally controllable conditional.
    * as a check on the correctness of your compiler, operating system, or hardware, unless you have a specific
  42.reason to believe there is something wrong with it and is in the process of debugging it.
  43.An overriding method may not throw a checked exception unless the overridden method also throws that exception or a superclass of that exception.
  44.The java.lang.Throwable class has two subclasses: Exception and Error.
  45.An Error indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions.
  46.The two kinds of exceptions in Java are: Compile time (Checked) and Run time (Unchecked) exceptions. All subclasses of Exception except the RunTimeException and its subclasses are checked exceptions.
    Examples of Checked exception: IOException, ClassNotFoundException.
    Examples of Runtime exception: ArrayIndexOutOfBoundsException, NullPointerException, ClassCastException, ArithmeticException, NumberFormatException.
  47.The unchecked exceptions do not have to be caught.
  48.A try block may not be followed by a catch but i
上一篇:刚过了SCJP,分享我的体会! 人气:477
下一篇:SCJP模拟题104道 人气:680
浏览全部Java的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-10-12 team论坛 v2.0.4 bulid 080916 A
2008-10-12 Roclog v3.1.6
2008-10-12 SupeV v1.0.1 简体中文 GBK
2008-10-12 NetCMS v1.6.0.1010 正式版
2008-10-12 PHP考试系统PPFrame v1.2.7
2008-10-12 LPAS个人相册 v1.6.3
2008-10-12 快问仿百度知道系统 动态-静态-互
2008-10-12 方卡广告防点击系统 V1.0 GB2312
2008-10-12 泡菜内容管理系统[PCMS] v1.0 Bu
2008-10-11 联系人分组工具 v1.1 中文破解版
2008-10-11 FaceMelter变脸 v2.0 汉化破解版
2008-10-11 PathTracker道路跟踪仪 v1.2 破解
2008-10-11 Rooms手机聊天室 v0.6.7 破解版
2008-10-11 RemoteDesktop远程桌面 v1.0 破解
2008-10-11 ProRemote远程调音台 v1.0.1 破解
2008-10-11 PicShare照片共享 v1.0.0 破解版
2008-10-11 Photogene照片编辑器 v1.5 汉化破
2008-10-11 WriteRoom共享文档 v1.0 破解版
  发表评论
姓 名: 验证码:
内 容:
站长工具:网站收录查询 | Google PR查询 | ALEXA排名查询 | CSS在线编辑器 | 广告代码 | js/vbs加密 | md5加密 | 进制转换 | UTF-8 转换工具 | Html转换js | Html转换asp | Html转换php | Html转换perl
实用工具:汉字翻译拼音 | 拼音字典 | 符号对照表 | 个税计算 | 实时汇率查询换算 | 经典小工具 | 汉字简繁转换 | 普通单位换算 | 公制单位换算 | 生辰老黄历 | 国内电话区号 | 国家代码与域名缩写 | 文字加密解密 | 健康查询 | 万年历 | 汉字横竖排版 | 手机号码查询 | 计算器 | ip搜索
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号