Programming in Java - Sachin Malhotra, Saurabh Chaudhary

Programming in Java

Buch | Softcover
656 Seiten
2010
OUP India (Verlag)
978-0-19-806358-2 (ISBN)
27,40 inkl. MwSt
  • Titel ist leider vergriffen;
    keine Neuauflage
  • Artikel merken
Java Programming is designed to serve as a textbook for undergraduate students of computer science and engineering and computer applications. The book covers the concepts of Object Oriented Programming before commencing with the fundamentals of JAVA. The reasons behind evolution of JAVA and the reasons for the replacement of C++ by JAVA as an Object Oriented Programming are also discussed. It includes topics such as Java Sockets, Applets, Swings, and Java Collections and Iterators. The book also encompasses all the modifications and enhancements related to JAVA 5.0 and JAVA 6. Numerous programming exercises are interspersed in the chapters for the better understanding of concepts. Besides having detailed exercises at the end of each chapter, the book has some key review questions along with their answers at the end, which could be helpful to the readers in revising the concepts learnt.

Mr. Sachin Malhotra is currently Deputy Director, SDGI, Ghaziabad. He has more than eight years of experience of teaching and training practicing professionals as well as undergraduate and postgraduate students in field of Networking, E-Commerce, and Web Technologies apart from Java. He is also associated as a trainer/lecturer in reputed institutes such as IMT-CDL Ghaziabad. He has also designed & conducted corporate trainings in Java and Networking. Mr. Saurabh Choudhary is currently Head of the Department, Dept. of I.T, I.M.S Ghaziabad, one of the premier institutes in northern India. He has been teaching postgraduate and undergraduate students at various levels for more than eight years and has been instrumental in various software development projects and trainings, particularly on Java.

1. Introduction to OOP ; 1.1 Introduction ; 1.2 Need of Object Oriented Programming ; 1.2.1 Procedural languages ; 1.2.2 Object-Oriented Modeling ; 1.2.2.1 Attributes ; 1.2.2.2 Behavior ; 1.3 Principles of Object Oriented Languages ; 1.3.1 Classes ; 1.3.2 Objects ; 1.3.3 Abstraction ; 1.3.4 Inheritance ; 1.3.5 Encapsulation ; 1.3.6 Polymorphism ; 1.4 Comparison between PO and OO Language ; 1.5 OOAD using UML ; 1.7 Application of OO Programming ; Summary ; Review Exercises ; 2. Getting Started with Java ; 2.1 Introduction ; 2.2 History of Java ; 2.3 Java's Journey-from Embedded Systems Middle Tier Applications ; 2.4 Java Essentials ; 2.5 Java Runtime ; 2.6 Java Features ; 2.6.1 Platform Independence ; 2.6.2 Object Oriented ; 2.6.3 Both Compiled & Interpreted ; 2.6.3.1 Interpretation ; 2.6.3.2 Compilation ; 2.6.3.3 The Java Approach ; 2.6.4 Java is Robust ; 2.6.5 JAVA Language Security Features ; 2.6.5.1 Java Security Model ; 2.6.5.2 The sandbox defined ; 2.6.6 Java is Multi-Threaded ; 2.6.7 Other Features ; 2.6.7.1 Automatic Memory Management ; 2.6.7.2 Dynamic Binding ; 2.6.7.3 Good Performance ; 2.6.7.4 Built-in Networking ; 2.7 JAVA Improvements ; 2.7.1 Java 5.0 Improvements ; 2.7.1.1 Quality, Stability, and Compatibility ; 2.7.1.2 Performance and Scalability ; 2.7.1.3 Ease of Development ; 2.7.1.4 Monitoring and Manageability ; 2.7.1.5 Improved Desktop Client ; 2.7.2 Java 5.0 Features ; 2.7.2.1 Autoboxing and unboxing ; 2.7.2.2 Enhanced for loop ; 2.7.2.3 Metadata ; 2.7.2.4 Formatted input and output and varargs ; 2.7.2.5 Static import ; 2.7.2.6 Graphics system improvements ; 2.7.2.7 New concurrency features ; 2.7.2.8 Generics ; 2.7.2.9 Enumerated types ; 2.7.2.10 String Builder class ; 2.7.3 about Java 6 ; 2.7.4 Brief Comparison of different releases ; 2.8 Some more Java Facts ; 2.8.1 Garbage Collection ; 2.8.2 No Pointers ; 2.8.3 No Global Variables ; 2.9 Differences between Java and C++ ; 2.10 Java Virtual Machine ; 2.11 Program Structure ; 2.11.1 Why save as Example.java? ; 2.12 Installation of JDK1.6 ; 2.12.1 Getting Started with the Java Developer's Kit ; 2.12.2 JDK Installation Notes ; 2.12.1 Run the JDK installer, if necessary ; 2.12.2.2 Update PATH and CLASSPATH variables ; 2.12.2.3 Testing the Installation ; 2.12.3 Exploring the Java Developer's Kit ; 2.13 Integrated Development Environment (IDE) ; SUMMARY ; REVIEW EXERCISES ; Programming Exercise ; 3. Java Programming Constructs ; 3.1 Variables ; 3.2 Primitive Data Types ; 3.3 Identifier ; 3.3.1 Rules for Naming ; 3.3.2 Naming Convention ; 3.3.3 Keywords ; 3.4 Literals ; 3.5 Operators ; 3.5.1 Binary Operators ; 3.5.1.1 Assignment Operator (=) ; 3.5.1.2 Arithmetic Operators (+, -, *, /, %) ; 3.5.1.3 Relational Operators ; 3.5.1.4 Boolean Logical Operators ; 3.5.1.4.1 Logical Operators ; 3.5.1.4.2 Conditional OR ( ; 3.5.2 Unary Operators ; 3.5.2.1 Increment and Decrement Operators ; 3.5.2.1.1 Prefix Increment / Decrement Operation ; 3.5.2.1.2 Postfix Increment / Decrement Operation ; 3.5.3 Ternary Operator ; 3.6 Expressions ; 3.7 Precedence rules and Associativity ; 3.8 Primitive Type Conversion and Casting ; 3.9 Flow of Control ; 3.9.1 Conditional Statements ; 3.9.1.1 Ifelse ; 3.9.1.2 switch-case ; 3.9.2 Loops ; 3.9.2.1 for loop ; 3.9.2.2 While Loop ; 3.9.2.3 do..while loop ; 3.9.2.4 for-each ; 3.9.3 Branching Mechanism ; 3.9.3.1 The break Statement ; 3.9.3.2 continue Statement ; Summary ; Review Exercises ; Programming Exercises ; 4. Classes and Objects ; 4.1 Classes ; 4.1.1 How to declare Class in JAVA? ; 4.1.2 The Class Body ; 4.2 Objects ; 4.2.1 Difference between Objects and Classes ; 4.2.2 Why should we use Objects and Classes? ; 4.3 Creating Objects ; 4.3.1 Declaring an Object ; 4.3.2 Instantiating an Object ; 4.3.3 Initializing an Object ; 4.3.3.1 Instance Variables ; 4.3.3.2 Accessing Variables and Methods ; 4.3.3.3Assigning Values to Variables and Methods ; 4.4 Methods ; 4.4.1 Why use methods? ; 4.4.2 Method Declaration ; 4.4.3 Method Invocation ; 4.4.4 Method Overloading ; 4.5 Constructors ; 4.5.1 Constructor Overloading ; 4.6 Cleaning Up Unused Objects ; 4.6.1 The Garbage Collector ; 4.6.2 Finalization ; 4.7 Class Variable and Methods - "static" Keyword ; 4.7.1 Static Variables ; 4.7.2 Static Methods ; 4.8 Arrays ; 4.8.1 One-dimensional arrays: ; 4.8.1.1 Creation of Array: ; 4.8.1.2 How to use for loop with array ; 4.8.1.3 Sorting an array ; 4.8.2 Two-Dimensional Arrays ; 4.8.3 Using for-each with arrays ; 4.9 'this' keyword ; 4.10 Command Line Arguments ; Summary ; Review Exercises ; Programming Exercise ; 5. Inheritance ; 5.1 Inheritance Vs Aggregation ; 5.1.1 Types of Inheritance ; 5.1.1.2 Single Level Inheritance ; 5.1.1.2 Multi Level Inheritance ; 5.1.1.3 Multiple Inheritance ; 5.1.2 Deriving Classes using extends Keyword ; 5.2 Method Overriding ; 5.3 super Keyword ; 5.4 final Keyword ; 5.5 Abstract Class ; Summary ; Review Exercises ; Programming Exercise ; 6. Interfaces Packages and Enumeration ; 6.1 Interface ; 6.1.1 Variables in Interface ; 6.1.2 Extending Interfaces ; 6.1.3 Interface Vs Abstract classes ; 6.2 Packages ; 6.2.2 Creating packages ; 6.2.2.1 Saving Compiling and executing packages ; 6.2.2.2 Setting the Class Path ; 6.2.2.3 Sub Packages ; 6.2.3 Using packages ; 6.2.3.1 Static Import ; 6.2.4 Access protection ; 6.3 Java. Lang package ; 6.3.1 The java.lang.Object class ; 6.3.2 Java Wrapper classes ; 6.3.2.1 Wrapper classes: Constructor and Methods ; 6.3.2.2 Autoboxing and Unboxing Of Wrappers ; 6.3.3 String Class ; 6.3.3.1 String Manipulation ; 6.3.3.2 String Methods ; 6.3.4 StringBuffer Class ; 6.3.5 StringBuilder Class ; 6.3.6 Splitting Strings ; 6.4 Enum type ; 6.4.1 Naming convention ; 6.4.2 Enumerated type inside a class ; 6.4.3 Printing enum values ; 6.4.4 Using if or switch Statements with an Enumerated Variable ; 6.4.5 Processing Enumerated Values Using for Loop: ; 6.4.6 Enumerated Types with Attributes and Methods ; Summary ; Review Exercises ; Programming Exercise ; 7. Exception Assertions and Logging ; 7.1 Introduction ; 7.1.1 Exception Types ; 7.2 Exception Handling Techniques ; 7.2.1 Try .. Catch ; 7.2.2 Throw ; 7.2.3 Throws ; 7.2.4 Finally block ; 7.3 User Defined Exception ; 7.4 Exception Encapsulation and Enrichment ; 7.5 Assertions ; 7.6 Logging ; Summary ; Review Questions ; Programming Exercises ; 8. Multithreading in Java ; 8.1 Introduction ; 8.2 Multithreading in Java ; 8.3 java.lang.Thread ; 8.4 The Main Thread ; 8.5 Creation of New Threads ; 8.5.1 By extending the thread class ; 8.5.2 Implementing the Runnable interface ; 8.6 Thread. State in Java ; 8.6.1 Thread States ; 8.7 Thread Priority ; 8.8 Synchronization ; 8.8.1 Synchronized methods ; 8.8.2 Synchronized statements ; 8.9 Multithreading - Using is Alive () and join () ; 8.10 Suspending and Resuming Threads ; 8.11 Communicating Between Threads ; Summary ; Review Exercises ; Programming Exercises ; 9. Input/Output, Serialization ; 9.1 Introduction ; 9.1.1The java.io.Input Stream and java.io.Output Stream ; 9.2 The java.io.File class ; 9.3 Reading and Writing Data ; 9.3.1 Reading/Writing Files using Byte Stream ; 9.3.2 Reading/Writing Console (User Input) ; 9.3.3 Reading/Writing Files using Character Stream ; 9.3.4 Reading/Writing Using Buffered Stream Classes ; 9.3.4.1 Reading/Writing using Buffered byte stream classes ; 9.3.4.2 Reading/Writing using Buffered Character stream classes ; 9.4 Randomly Accessing a File ; 9.5 Reading and Writing Files using new I/O package ; 9.6 Serialization ; Summary ; Review Questions ; Programming Exercises ; 10. java.util and Generics ; 10.1 Introduction ; 10.2 Generics ; 10.2.1 Using Generics in Arguments and return types ; 10.2.2 Wildcards ; 10.2.3 Bounded Wildcards ; 10.2.4 Defining your own Generic classes ; 10.3 Linked List ; 10.5 Set ; 10.5.1 Hashing ; 10.5.2 HashSet class ; 10.5.3 TreeSet class ; 10.6 Maps ; 10.6.1 HashMap class ; 10.6.2 TreeMap class ; 10.7 Collections class ; 10.8 Legacy classes and interfaces ; 10.8.1 Difference between Vector Vs ArrayList ; 10.8.2 Difference between Enumerations Vs Iterator ; Summary ; Review Exercises ; Programming Exercises ; 11. Network Programming ; 11.1 Introduction ; 11.1.1 TCP/IP Protocol suite ; 11.2 Sockets ; 11.2.1 TCP Client and Server ; 11.2.2 UDP Client and Server ; 11.3 URL class ; 11.4 Multithreaded sockets ; 11.5 Network Interface ; Summary ; Review Exercises ; 12. Applet ; 12.1 Introduction ; 12.2 Applet class ; 12.3 Applet Structure ; 12.4 An example applet program ; 12.4.1 How to run an applet ; 12.5 Applet life cycle ; 12.6 Common methods used in displaying the output ; 12.7 paint ( ), update ( ) and repaint ( ): ; 12.7.1 Paint () ; 12.7.2 Update () method ; 12.7.3 Repaint () method ; 12.8 More about APPLET tag ; 12.9 getDocumentBase () and getCodeBase() ; 12.10 AppletContext Interface ; 12.10.1 Communication between two applets ; 12.11 How to use an audio clip ; 12.12 Graphics class ; 12.12.1 An Example Applet using Graphics ; 12.13 Color ; 12.14 Font ; 12.15 FontMetrics ; Summary ; Review Questions ; Programming Exercise ; 13. Event Handling in Java ; 13.1 Introduction ; 13.2 Event Delegation Model ; 13.3 java.awt event Description ; 13.3.1 Event Classes ; 13.3.1.1 Action Event Class ; 13.4 Sources of Events ; 13.5 Event Listeners ; 13.6 How does the model work? ; 13.6.1 An example showing the use of Mouse Motion Listener ; 13.7 Adapter Classes ; 13.7.1 How to use Adapter Classes ; 13.7.2 Adapter Classes in Java ; 13.8 Inner Classes ; Summary ; Review Exercises ; Programming Exercises ; 14. AWT (Abstract Windowing Toolkit) ; 14.1 Introduction ; 14.1.1 Why AWT? ; 14.1.2 Java.awt package ; 14.2 Components and containers ; 14.2.1 Component ; 14.2.2 Components as event generator ; 14.3 Button ; 14.4 Label ; 14.5 Checkbox ; 14.6 RADIO BUTTONS ; 14.7 LIST BOXES ; 14.8 CHOICE BOXES ; 14.9 TEXTFIELD & TEXTAREA ; 14.10 Container class ; 14.10.1 Types of containers ; 14.10.2 Panels ; 14.10.2.1 How to Use Panels ; 14.10.3 Window ; 14.10.4 Frame ; 14.11 Layouts ; 14.11.1 Flow Layout ; 14.11.2 Border Layout ; 14.11.3 Card Layout ; 14.11.4 Grid Layout ; 14.11.5 Grid Bag Layout ; 14.12 MENU ; 14.13 Scrollbar ; Summary ; REVIEW EXERCISES ; PROGRAMMING EXERCISE ; 15. Swing ; 15.1 Introduction ; 15.1.1 Features of Swing ; 15.1.2 Differences between Swing and AWT ; 15.2 JFrame ; 15.3 JApplet ; 15.4 JPanel ; 15.5 Components in swings ; 15.6 Layout Managers ; 15.6.1 Spring Layout ; 15.6.2 Box Layout ; 15.7 JList & JScroll Pane ; 15.8 Split Pane ; 15.9 JTabbed Pane ; 15.10 Dialog Box ; 15.11 Pluggable Look and Feel ; Summary ; Review Exercises ; Programming Exercises ; 16. Introduction to Advanced Java ; 16.1 Database Handling using JDBC ; 16.1.1 Load the Driver ; 16.1.1.1 Type 1: Jdbc Odbc Bridge Driver ; 16.1.1.2 Type 2: Native-API/partly Java driver ; 16.1.1.3 Type 3: Net-protocol driver ; 16.1.1.4 Type 4: Pure java driver ; 16.1.2 Establish Connection ; 16.1.3 Create statement ; 16.1.4 Execute Query ; 16.1.5 Iterate Result Set ; 16.1.6 An Example ; 16.2 Servlets ; 16.2.1 Life cycle of Servlets ; 16.2.2 First Servlet ; 16.2.3 Reading Client Data ; 16.2.5 Http Redirects ; 16.2.6 Cookies ; 16.4 Remote Method Invocation ; 16.4.1 RMI Networking Model ; 16.4.1.1 Stub & Skeleton ; 16.4.2 Creating an RMI Application ; 16.4.2.1 Creating an Interface ; 16.4.2.2 Server class ; 16.4.2.3 RMI registry ; 16.4.2.4 Stub ; 16.4.2.5 Client ; 16.4.2.5 Executing RMI Server and Client ; Summary ; Review Exercises ; Programming Exercises

Zusatzinfo 101 line drawings; 1 picture
Verlagsort New Delhi
Sprache englisch
Maße 186 x 243 mm
Gewicht 810 g
Themenwelt Informatik Programmiersprachen / -werkzeuge Java
Mathematik / Informatik Informatik Web / Internet
ISBN-10 0-19-806358-X / 019806358X
ISBN-13 978-0-19-806358-2 / 9780198063582
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
mit über 150 Workouts in Java und Python

von Luigi Lo Iacono; Stephan Wiefling; Michael Schneider

Buch (2023)
Carl Hanser (Verlag)
29,99
Einführung, Ausbildung, Praxis

von Christian Ullenboom

Buch | Hardcover (2023)
Rheinwerk (Verlag)
49,90