JAVA
richul
这个作者很懒,什么都没留下…
展开
-
Identifiers
case-sensitive. identifiers can have letters and numbers, but a number may not begin the identifier name. $ and _ (underscore) symbols are allowed.原创 2007-08-30 11:35:00 · 177 阅读 · 0 评论 -
Java keywords
(1) abstract(3) boolean break byte(6) case catch char class const continue(3) default do double(2) else extends(4) final finally float for(1) goto(1) if(5) implements import instanceof原创 2007-08-30 15:30:00 · 271 阅读 · 0 评论 -
Error Handling
catch Declares the block of code used to handle an exception.finally Block of code usually following a tra-catch statement which is executed no matter what program flow occurs when dealing with an e原创 2007-08-30 16:54:00 · 183 阅读 · 0 评论 -
Package Control
import Statement to import packages or classes into code.package Specifies to which package all classes in a source file belong.原创 2007-08-30 17:01:00 · 174 阅读 · 0 评论 -
Primitives
boolean Boolean literals indicating ture or false.byte 8-bit integer.char Stores one Unicode character.double 64-bit floating-point number.float 32-bit floating-point number.int 32-bit integ原创 2007-08-30 17:04:00 · 247 阅读 · 0 评论 -
Variable Keywords
super Reference variable referring to the immediate superclass.this Reference variable referring to the current instance of an object.void Indicates no return type for a method.原创 2007-08-30 17:07:00 · 165 阅读 · 0 评论 -
Java Class, Method, and Variable Modifiers
abstract A method or class that cannot be instantiated, and which may define methods to be overwritten. class Keyword used to specify a class.extends Used to indicate the superclass that a subclas原创 2007-08-30 16:40:00 · 372 阅读 · 0 评论 -
Package
Creating a Package such as com.syngress:1. Create a directory such as Myclasses. Edit your environment variable classpath to include the directory you just created. For UNIX: setenv原创 2007-08-30 13:21:00 · 248 阅读 · 0 评论 -
Java Access Modifiers
private Makes a method or a variable accessible only from within its own class.protected Makes a method or a variable accessible only to classes in the same package or subclasses of the class.pub原创 2007-08-30 15:35:00 · 242 阅读 · 0 评论 -
Java Unused Keywords
const Do not use to declare a constant; use public static final.goto Not implemented in the Java language.原创 2007-08-30 17:09:00 · 185 阅读 · 0 评论 -
Import Statements
The import statement is used to make the classes in a package available. A typical import statement appears after any package statement and before any class definitions. import java.uti原创 2007-08-30 21:19:00 · 190 阅读 · 0 评论 -
Keywords, Indentifiers, Reserved words
true, false, and null are reserved words but not key words. There is a difference in terminology. keywords and identifiers are special reserved words in Java that cannot be used as identifiers for c原创 2007-08-30 21:27:00 · 212 阅读 · 0 评论 -
Determining Access to Class Members
Determining Access to Class Members Visibility Public Protected Default Private原创 2007-09-03 15:13:00 · 206 阅读 · 0 评论 -
Exception
Exception handling allows developers to detect errors easily without writing special code to test return values. Even better, it lets us handle these errors in code that is nicely separated from the c原创 2007-09-05 13:48:00 · 240 阅读 · 0 评论 -
Legal Return Types
Return Primitive Typesboolean: the only type of value that can be returned is a boolean literal such as true or false. Java will not accept a boolean object, null, an integer value such as 0 or 1, o原创 2007-09-04 09:33:00 · 314 阅读 · 0 评论 -
Casting
Casting can be used on primitives or instances to convert the current type. There are two types of casts, implicit and explicit. An implicit cast is legal at runtime, becuase the subclass value is c原创 2007-09-04 23:10:00 · 323 阅读 · 0 评论 -
Passing Variables into Method
When passing object arguments to a method, you must keep in mind it is a reference variable that is being passed, and not the actual object itself. A reference variable is a name that points to a loca原创 2007-09-04 23:30:00 · 223 阅读 · 0 评论 -
Java Operators
The instanceof opertor can be used only to test objects (or null) with class types that are in the same class hierarchy.The equality operators (== and != ) compare reference variables when used on o原创 2007-09-04 23:38:00 · 264 阅读 · 0 评论