Everything you do now is for your future. Think About that.
--Your friends at LectureNotes

Java Programming

by Narmada Cse
Type: NoteDownloads: 46Views: 1235Uploaded: 4 months agoAdd to Favourite

Share it with your friends

Suggested Materials

Leave your Comments


Narmada Cse
Narmada Cse
Table of Content 01 - INTRODUCTION & OVERVIEW ❖ Platform-Independency ❖ Java Technology Product Groups ❖ Downloading and Installing JDK 02 - BASIC OO CONCEPTS OF JAVA ❖ Java Syntax and Class Review ❖ Encapsulation and Sub-classing ❖ Java Class Design 03 - OTHER OO CONCEPTS OF JAVA ❖ Advanced Class Design ❖ Inheritance with Java Interfaces ❖ Generics and Collections 04 - INPUT AND OUTPUT ❖ Java I/O Fundamentals ❖ Java File I/O (NIO.2) 05 - JAVA THREADS ❖ Threading ❖ Concurrency 04 - JAVA FOR DATABASE ❖ Building Database Applications with JDBC ❖ Localization ❖ SQL Primer
Experience with at least one programming language An understanding of object-oriented principles Experience with basic database concepts and a basic knowledge of SQL Chapter 1 Introduction Prerequisites Course Goals This course covers the core APIs that you use to design object-oriented applications with Java. This course also covers writing database programs with JDBC. Use this course to further develop your skills with the Java language and prepare for the Oracle Certified Professional, Java SE 7 Programmer Exam. Course Objectives After completing this course, you should be able to do the following: Create Java technology applications that leverage the object-oriented features of the Java language, such as encapsulation, inheritance, and polymorphism Execute a Java application from the command line Create applications that use the Collections framework Implement error-handling techniques using exception handling Implement input/output (I/O) functionality to read from and write to data and text files and understand advanced I/O streams Manipulate files, directories, and file systems using the JDK7 NIO.2 specification Perform multiple operations on database tables, including creating, reading, updating, and deleting, using the JDBC API Process strings using a variety of regular expressions Create high-performing multi-threaded applications that avoid deadlock Localize Java applications To successfully complete this course, you must know how to: Compile and run Java applications Create Java classes Create object instances using the new keyword Declare Java primitive and reference variables Declare Java methods using return values and parameters Use conditional constructs such as if and switch statements Use looping constructs such as for, while, and do loops Declare and instantiate Java arrays Use the Java Platform, Standard Edition API Specification (Javadocs) Class Introductions Briefly introduce yourself: Name Title or position Company Experience with Java programming and Java applications Reasons for attending Course Environment Audience The target audience includes those who have: Completed the Java SE 7 Fundamentals course or have experience with the Java language, and can create, compile, and execute programs In this course, the following products are preinstalled for
the lesson practices: JDK 7: The Java SE Development Kit includes the command-line Java compiler (javac) and the Java Runtime Environment (JRE), which supplies the java command needed to execute Java applications. Firefox: A web browser is used to view the HTML documentation (Javadoc) for the Java SE Platform libraries. NetBeans 7.0.1: The NetBeans IDE is a free and open-source software development tool for professionals who create enterprise, web, desktop, and mobile applications. NetBeans 7.0.1 fully supports the Java SE 7 Platform. Support is provided by Oracle's Development Tools Support offering. Java DB: Java DB is Oracle's supported distribution of the open-source Apache Derby 100% Java technology database. It is fully transactional, secure, easy-to-use, standardsbased SQL, JDBC API, and Java EE yet small, only 2.5 MB. Java Programs are PlatformIndependent Platform-Independent Programs Java technology applications are written in the Java programming language and compiled to Java bytecode. Bytecode is executed on the Java platform. The software that provides you with a runnable Java platform is called a Java Runtime Environment (JRE). A compiler, included in the Java SE Development Kit (JDK), is used to convert Java source code to Java bytecode. Java Technology Product Groups Identifying Java Technology Groups Oracle provides a complete line of Java technology products ranging from kits that create Java technology programs to emulation (testing) environments for consumer devices, such as cellular phones. As indicated in the graphic, all Java technology products share the foundation of the Java language. Java technologies, such as the Java Virtual Machine, are included (in different forms) in three different groups of products, each designed to fulfill the needs of a particular target market. The figure illustrates the three Java technology product groups and their target device types. Among other Java technologies, each edition includes a Software Development kit (SDK) that allows programmers to create, compile, and execute Java technology programs on a particular platform: Java Platform, Standard Edition (Java SE): Develops applets and applications that run within Web browsers and on desktop computers, respectively. For example, you can use the Java SE Software Development Kit (SDK) to create a word processing program for a personal computer. You can also use the Java SE to create an application that runs in a browser. Note: Applets and applications differ in several ways. Primarily, applets are launched inside a web browser, whereas applications are launched within an operating system. Java SE Platform Versions Year 1996 1997 1998 2000 2002 Developer Version (JDK) 1.0 1.1 1.2 1.3 1.4 Platform 1 1 2 2 2
2004 2006 2011 1.5 1.6 1.7 5 6 7 How to Detect Your Version If Java SE is installed on your system, you can detect the version number by running java -version. Note that the java command is included with the Java Runtime Environment (JRE). As a developer, you also need a Java compiler, typically javac. The javac command is included in the Java SE Development Kit (JDK). Your operation system’s PATH may need to be updated to include the location of javac. Downloading and Installing the JDK Java is common in enterprise environments: Oracle Fusion Middleware Java application servers - GlassFish - WebLogic Database servers MySQL Oracle Database Enterprise Environments 1. Go to http://www.oracle.com/technetwork/java/ javase/downloads/index.html. 2. Choose the Java Platform, Standard Edition (Java SE) link. 3. Download the version that is appropriate for your operation system. 4. Follow the installation instructions. 5. Set your PATH. Java in Server Environments In this course, you develop Java SE applications. There are standard patterns you need to follow when implementing Java SE applications, such as always creating a main method that may be different when implementing enterprise applications. Java SE is only the starting point in your path to becoming a Java developer. Depending on the needs of your organization, you may be required to develop applications that run inside Java EE application servers or other types of Java middleware. Often, you will also need to manipulate information stored inside relational databases such as MySQL or Oracle Database. This course introduces you to the fundamentals of database programming. The Java Community

Lecture Notes