Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 526 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
526
Dung lượng
5,74 MB
Nội dung
[...].. .J2ME inaNutshell Java Threads, by Scott Oaks and Henry Wong A book that describes how to make use of Java's built -in multithreading features, which are also available in the J2ME platform Learning Wireless Java, by Qusay Mahmoud An introduction to Wireless Java, this book also shows how to install MIDlets in some of the Java-enabled cell phones that are currently available J2ME Programming Resources... to be the way ahead for Java on small devices, but, as noted at the beginning of this chapter, there are other Java platforms already in existence (and in use) that have similar scope The following sections briefly summarize these alternative platforms and compare them to J2ME 14 J2ME in aNutshell 1.3.1 JavaCard JavaCard is a platform aimed at smart card technology Smart cards are the smallest environment... in aNutshell Constant width Used in all Java code and generally for anything that you would type literally when programming, including keywords, data types, constants, method names, variables, class names, and interface names Constant width italic Used for the names of function arguments and generally as a placeholder to indicate an item that should be replaced with an actual value in your program... when they are loaded into the CLDC virtual machine during class file verification (see Section 2.1.2 for a discussion of class file verification) 2.1.1.2 Language omissions Aside from the floating point restrictions, there are a few other Java language features that are not available to CLDC applications: Reflection The java.lang.reflect package and all of the features of java.lang.Class that are connected... bestselling Java ina Nutshell, which is one of the two books that made it possible for me to make my living in the Java world First and foremost, therefore, I would like to express my thanks to David Flanagan, the author of Java ina 6 J2ME in aNutshell Nutshell, both for his part in getting me started down this path and for his help and advice during the creation of reference material for J2MEina Nutshell. .. is based on JDK 1.1.8 and includes a fully featured Java VM The specification, available at http://java.sun.com/products/personaljava/, designates each of the core JDK 1.1.8 packages as required, modified, or optional Similar designations may also be applied to individual classes and methods A required package must contain all of the classes from its JDK 1.1.8 counterpart, and each class must be a full... Therefore, finalization is not implemented, and the CLDC java.lang.Object class does not have a finalize( ) method Threading features CLDC provides threads, but it does not allow the creation of a daemon thread (a thread that is automatically terminated when all non-daemon threads in the VM terminate) or thread groups Errors and exceptions J2SE has a large number of classes that represent error and exception... begin with an invocation of a constructor of its superclass (with the exception of the constructor of java.lang.Object) 20 J2ME in aNutshell • Local variables and instance and static members declared to contain a reference to an object of a particular type must always hold a reference to an object of that type or one that is legally assignable to it It is not legal, for example, to define a variable... low-end devices, can make it impossible for aJ2ME virtual machine to support all of the Java language features or instruction byte codes and software optimizations provided by a J2SE VM Therefore, J2ME VMs are usually defined in terms of those parts of the Java Virtual Machine Specification and the Java Language Specification that they are not obliged to implement As an example of this, devices targeted... licensed Java to Netscape, which incorporated it into its own popular browser, at the time the undisputed market leader Thus, the world was introduced to Java applets Within a couple of years, the cross-platform capabilities of the Java programming language and its potential as a development platform for free-standing applications that could be written once and then run on both Windows and Unix-based systems . best-selling Java in a Nutshell, by David Flanagan, and Java Enterprise in a Nutshell, by Jim Farley, David Flanagan, and William Crawford (both published by O'Reilly). Java in a Nutshell introduces. Package Contents 308 308 309 310 11. java.io Package java.io ByteArrayInputStream ByteArrayOutputStream DataInput DataInputStream DataOutput DataOutputStream EOFException InputStream. world was introduced to Java applets. Within a couple of years, the cross-platform capabilities of the Java programming language and its potential as a development platform for free-standing applications