Java Reference
In-Depth Information
Summary
Java is a language for describing programs. This general-purpose, class-based, and
object-oriented language is patterned after C and C++ to make it easier for existing
C/C++ developers to migrate to Java.
JavaisalsoaplatformonwhichtorunprogramswritteninJavaandotherlanguages
(e.g., Groovy, Jython, and JRuby). Unlike platforms with physical processors (e.g., an
Intelprocessor)andoperatingsystems(e.g.,Windows7),theJavaplatformconsistsof
a virtual machine and execution environment.
Before you can develop Java programs, you need to determine what kind(s) of pro-
grams you want to develop and then install the appropriate software. Use the JDK to
developstandaloneapplicationsandapplets,theJavaMESDKtodevelopMIDletsand
Xlets, and the Java EE SDK to develop servlets and JSPs.
Forsmallprojects,it'snobigdealtoworkatthecommandlinewithJDKtools.Be-
cause you'll probably find this scenario tedious (and even unworkable) for larger pro-
jects, you should also consider obtaining an IDE such as NetBeans 7, which includes
support for those language features introduced by JDK 7.
Most computer languages support comments, identifiers, types, variables, expres-
sions,andstatements.Commentsletyoudocumentyoursourcecode;identifiersname
things(e.g.,classesandmethods);typesidentifysetsofvalues(andtheirrepresentations
inmemory)andsetsofoperationsthattransformthesevaluesintoothervaluesofthat
set;variablesstorevalues;expressionscombinevariables,methodcalls,literals,andop-
erators; and statements are the workhorses of a program, and include assignment, de-
cision, loop, break and labeled break, and continue and labeled continue.
NowthatyoupossessabasicunderstandingofJava'sfundamentallanguagefeatures,
you're ready to learn about Java's language support for classes and objects. Chapter 2
introduces you to this support.
Search WWH ::




Custom Search