文谷首页 | 业界传真 | 网络技术 | 服务器 | 数据库 | 存储技术 | 系统安全 | 无线技术 | Cisco | .Net | Windows | Linux | Unix | Java
电子商务 | 网站工程 | 网页设计 | 平面设计 | 多媒体 | 编程语言 | Oracle | MSSQL | Photoshop | ASP | PHP | 实用技巧 | 进程查询 | 文谷论坛
Java频道
 资讯动态   考试认证   新手入门   核心技术   高级技术   J2EE   J2ME   XML   开源技术   其他技术
您现在的位置: IT文谷 >> 开发平台 >> Java >> 考试认证 >> 考试介绍 >> 文章正文
SCJP1.4高效率复习提纲SCJP1.4高效率复习提纲2006-7-18 22:56:58SCJP1.4高效率复习提纲2006-7-18 22:56:58SCJP1.4高效率复习提纲
SCJP1.4高效率复习提纲
SCJP1.4高效率复习提纲SCJP1.4高效率复习提纲2006-7-18 22:56:58SCJP1.4高效率复习提纲2006-7-18 22:56:58SCJP1.4高效率复习提纲
SCJP1.4高效率复习提纲SCJP1.4高效率复习提纲2006-7-18 22:56:58SCJP1.4高效率复习提纲2006-7-18 22:56:58SCJP1.4高效率复习提纲

  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

SCJP1.4高效率复习提纲SCJP1.4高效率复习提纲2006-7-18 22:56:58SCJP1.4高效率复习提纲2006-7-18 22:56:58SCJP1.4高效率复习提纲
  • 上一篇文章:

  • 下一篇文章:
  • 进入论坛讨论

    相关文章
    CCNA实验模拟器系列]思科网络技术学院FLASH实验介绍
    [CCNA实验模拟器系列] Boson NetSim破解下载图例
    [CCNA考试模拟系统系列] CertSim 破解下载图例
    主流CCNA实验模拟器介绍(2004版)
    CCNA专业英文词汇全集
    CCNA认证考试折扣号申请说明
    一句话Q&A:我有必要在考CCDA之前先取得CCNA认证吗?
    一句话Q&A:第一次参加Cisco考试,没有通过的话能不能重考?
    一句话Q&A:CCNA证书有效期和再认证考试怎么考?
    一句话Q&A:CCNA的培训一般是多长时间?
    一句话Q&A:CCNA和MCSE需要多少英语基础和专业基础知识?
    MCSE与CCNA的比较
    热门文章最新推荐

    版权与免责声明:
    ① 本网转载其他媒体稿件是为传播更多的信息,此类稿件不代表本网观点,版权归原作者所有,本网不承担此类稿件侵权行为的连带责任。
    ② 本站原创文章,转载时请注明出自文谷及作者姓名
    ③在本网BBS上发表言论者,文责自负。
    ④如您因版权等问题需要与本网联络,请在30日内联系 。
    SCJP1.4高效率复习提纲SCJP1.4高效率复习提纲2006-7-18 22:56:58SCJP1.4高效率复习提纲2006-7-18 22:56:58SCJP1.4高效率复习提纲
    SCJP1.4高效率复习提纲SCJP1.4高效率复习提纲2006-7-18 22:56:58SCJP1.4高效率复习提纲2006-7-18 22:56:58SCJP1.4高效率复习提纲

    全站热点
    最新推荐
    关于文谷 | 联系文谷 | 免责声明 | 文谷论坛
    Tel: 0577-65690019      E-mail: ichenjian@gmail.com    MSN:ichenjian@hotmail.com    QQ:2911194
    Copyright © 2004-2008 wengu.com 文谷 All Rights Reserved
    浙ICP备05000327号