Java programming [electronic resource
معرفی کتاب «Java programming [electronic resource» نوشتهٔ Pandey, Hari Mohan، منتشرشده توسط نشر Dorling Kindersley (India)/Pearson در سال 2012. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Java programming [electronic resource» در دستهٔ بدون دستهبندی قرار دارد.
Cover......Page 1 Brief Contents......Page 4 Contents......Page 6 Preface......Page 18 Acknowledgements......Page 22 1.1.2 Loop or Iteration Structure......Page 24 1.3 Programming Methodology......Page 25 1.5 Basic Concepts of OOPs......Page 27 1.7 Advantages of OOPs......Page 29 Multiple Choice Questions......Page 30 Key for Multiple Choice Questions......Page 31 2.2 Evolution of Java......Page 32 2.4 Key Features of Java......Page 33 2.5.1 Java Tokens......Page 35 2.7 How to Put Comments in Java?......Page 38 2.8 Data Types in Java......Page 39 2.9 Structure of a Java Program......Page 40 2.10 Your First Program in Java......Page 41 2.10.1 Compiling and Running the Program (DOS Based)......Page 42 2.12 Programming Examples......Page 46 2.13 Reading Using Scanner......Page 55 2.14 Command Line Arguments......Page 56 2.16.1 What is the Java Virtual Machine? Why is it Here?......Page 58 2.16.4 The Proud, the Few, the Registers......Page 59 2.16.8 What is in a Class File?......Page 60 2.17.1 How to Get Bytecode ?......Page 61 2.17.2 Implementation of Bytecode Works......Page 63 2.19 Java, Internet and WWW......Page 67 2.20 JDK TooLS......Page 68 2.21 Ponderable Points......Page 69 Review Questions......Page 70 Key for Multiple Choice Questions ......Page 71 3.1.2 Unary Operators......Page 72 3.2 Arithmetic Operators......Page 73 3.3 Relation and Ternary Operator......Page 76 3.4.1 Logical AND (&&)......Page 79 3.4.2 Logical OR......Page 80 3.5 Assignment Operator......Page 81 3.6 Increment (++) and Decrement (--) Operator......Page 82 3.7.1 Bitwise AND (&)......Page 84 3.7.2 Bitwise OR (|)......Page 85 3.7.4 1’s Complement (~)......Page 86 3.7.5 Left Shift Operator ( )......Page 88 3.7.7 Right Shift with Zero Fill (>>>)......Page 89 3.8 The Instance of Operator......Page 90 3.9 The Comma Operator......Page 91 3.11 Precedence of Operator......Page 92 3.12 Type Conversion and Typecasting......Page 93 3.13 Mathematical Functions......Page 94 3.14 Scope and Lifetime......Page 96 3.15 Ponderable Points......Page 97 Multiple Choice Questions......Page 98 Key for Multiple Choice Questions ......Page 99 4.2 The if Statement......Page 100 4.3 The if-else Statement......Page 102 4.4 Nesting of if-else Statement......Page 104 4.5 else-if Ladder......Page 106 4.6 Switch-Case Statement......Page 109 4.7.1 The while Loop......Page 112 4.7.2 The for Loop......Page 119 4.8 Different Syntaxes of for Loop......Page 120 4.9 Programming Examples......Page 121 4.9.1 Nesting of for Loop......Page 123 4.9.2 The do-while Statement......Page 128 4.10.1 The break Statement......Page 131 4.10.2 The continue Statement......Page 133 4.10.3 Labelled break and continue Statement......Page 134 Review Questions......Page 136 Multiple Choice Questions......Page 137 Key for Multiple Choice Questions......Page 138 5.2 Creating Arrays in Java......Page 139 5.3 Some Important Points About Array......Page 140 5.4 Initializing 1-D Array......Page 141 5.5 Programming Examples (Part-1)......Page 142 5.6 Two-dimensional (2-D) Array......Page 148 5.7.1 3-D Array......Page 157 Review Questions......Page 160 Multiple Choice Questions......Page 161 Key for Multiple Choice Questions ......Page 162 6.2 Function Declaration and Definition......Page 163 6.3 No Return Type but Arguments......Page 165 6.3.1 Returning Prematurely from Function......Page 168 6.4 Function with Parameters and Return Type......Page 169 6.5 Recursion......Page 172 6.6 Function Overloading......Page 174 6.7 Ponderable Points......Page 177 Multiple Choice Questions......Page 178 Key for Multiple Choice Questions......Page 179 7.1 Introduction......Page 180 7.2 Programming Examples......Page 183 7.3 Accessing Private Data......Page 187 7.4 Passing and Returning Objects......Page 190 7.5 Copying Objects......Page 194 7.6 Array of Objects......Page 197 7.7 Static Class Members......Page 200 7.7.1 Static Member Functions......Page 201 7.7.2 Static Data Members......Page 202 7.8 Constructors......Page 204 7.8.1 Constructors with Parameters......Page 205 7.9 Copy Constructor......Page 218 7.10 The this Reference......Page 219 7.12 The Final Keyword Revisited......Page 224 7.12.1 Blank Finals......Page 225 7.12.2 Final Arguments to Methods......Page 226 Review Questions......Page 227 Key for Multiple Choice Questions......Page 229 8.2 Types of Inheritance......Page 230 8.2.2 Multilevel Inheritance......Page 231 8.2.4 Hierarchical Inheritance......Page 232 8.2.5 Hybrid Inheritance......Page 233 8.3 Programming Examples......Page 234 8.4 Method Overriding......Page 241 8.5 Dynamic Method Dispatch......Page 242 8.6 Hierarchical Inheritance Revisited......Page 244 8.7 The Super Keyword......Page 246 8.8 Constructor and Inheritance......Page 247 8.9 Object Slicing......Page 252 8.11 Abstract Class......Page 254 8.12 Ponderable Points......Page 260 Multiple Choice Questions......Page 261 Key for Multiple Choice Questions ......Page 262 9.2.1 Built-in Packages......Page 263 9.2.2 User-defined Packages......Page 264 9.3 Interface......Page 275 9.3.2 Interface Implementation......Page 276 9.3.3 Programming Examples......Page 277 9.3.4 Extending Classes and Interfaces......Page 283 9.4 Ponderable Points......Page 285 Multiple Choice Questions......Page 286 Key for Multiple Choice Questions......Page 287 10.1 The String Class......Page 288 10.2 Constructors for String Class......Page 289 10.3 Methods of String Class......Page 290 10.4 Programming Examples (Part 1)......Page 295 10.5 The StringBuffer Class......Page 299 10.7 Methods of StringBuffer Class......Page 300 10.8 Programming Examples (Part 2)......Page 303 Review Questions......Page 304 Multiple Choice Questions......Page 305 Key for Multiple Choice Questions......Page 306 11.2 What is Exception?......Page 307 11.3 Basis for Exception Handling......Page 308 11.5 Exception Classes in Java......Page 309 11.5.2 Checked versus Unchecked Exception......Page 310 11.6 Without Try-Catch......Page 312 11.7 Exception Handling Using Try and Catch......Page 313 11.8 Creating Your Own Exception......Page 327 11.9 Ponderable Points......Page 329 Multiple Choice Questions......Page 330 Key for Multiple Choice Questions......Page 331 12.1 Introduction......Page 332 12.2.1 Extending Thread Class......Page 333 12.2.2 Thread Methods......Page 336 12.2.3 Implementing Thread Using Runnable......Page 341 12.3 Thread Priority......Page 343 12.4.1 The Synchronized Method......Page 345 12.5 Thread Communication......Page 347 12.6 Suspended and Resuming Threads......Page 350 12.7 Daemon Threads......Page 354 12.8 Ponderable Points......Page 356 Multiple Choice Questions......Page 357 Key for Multiple Choice Questions......Page 358 13.2 Working with Files......Page 359 13.2.1 Method of File Class......Page 360 13.3 Types of Streams......Page 367 13.3.1 Character Streams......Page 368 13.3.2 Programming Examples......Page 371 13.3.3 Byte Stream......Page 374 13.4 Reading from Console......Page 375 13.5 Writing to Console......Page 376 13.6 Reading and Writing Files......Page 377 Review Questions......Page 382 Key for Multiple Choice Questions......Page 383 14.2 Applet versus Application Programs......Page 384 14.3 The Applet Class......Page 385 14.4 Writing the First Applet......Page 386 14.5 Life Cycle of an Applet......Page 389 14.6 Applet Tag and Applet Parameters......Page 391 14.7 Passing Parameter to Applet......Page 392 14.8.1 The Paint Method......Page 395 14.8.3 The Repaint Method......Page 396 14.9 Get Document Base() and Get Code Base() Methods......Page 398 14.10 The AppletContext Interface......Page 400 14.11 Playing Audio in Applet......Page 401 14.11. 1 Playing Audio Using Play Method of Applet Class......Page 402 14.11.2 Playing Audio Using AudioClip Interface......Page 403 14.12.1 Drawing Lines and Rectangles......Page 406 14.12.2 Drawing Ovals and Circles......Page 407 14.12.3 Drawing Polygon......Page 408 14.12.4 Using Color......Page 409 14.12.5 Setting the Drawing Mode......Page 410 14.12.6 Programming Example......Page 414 14.13 Working with Fonts......Page 420 14.14 The FontMetrics Class......Page 423 14.15 Ponderable Points......Page 425 Multiple Choice Questions......Page 426 Key for Multiple Choice Questions......Page 427 15.2 The Delegation Event Model......Page 428 15.3 The Event Classes......Page 429 15.6 Discussion of Event Classes......Page 430 15.7 The Listeners Interfaces......Page 437 15.8. 1 Handling Mouse Events......Page 440 15.8.2 Handling Keyboard Events......Page 447 15.9 Adapter Classes......Page 451 15.10 Nested and Inner Classes......Page 454 15.10.1 Inner Classes in Methods and Scopes......Page 459 15.10.2 Static Nested Class......Page 461 15.10.3 Inner Classes in Event Handling......Page 462 15.10.4 Anonymouse Inner Class......Page 464 15.11 Ponderable Points......Page 467 Key for Multiple Choice Questions......Page 468 16.2 Structure of the AWT......Page 469 16.3.2 The Container Class......Page 472 16.3.6 Applet Frame Class......Page 473 16.4 AWT Controls......Page 481 16.4.1 The Button Control......Page 482 16.4.2 The Label Class......Page 487 16.4.3 The Checkbox Class......Page 489 16.4.4 The CheckboxGroup Class......Page 493 16.4.5 The List Class......Page 496 16.4.6 The Choice Class......Page 503 16.4.7 The Scrollbar Class......Page 506 16.4.8 The Textfield Class......Page 511 16.4.9 The TextArea Class......Page 515 16.5 Menu and Menubars......Page 518 16.5.1 Adding Shortcut Key to Menu......Page 524 16.6 Popup Menus......Page 526 16.7 Dialogs......Page 529 16.8 The FileDialog Class......Page 534 16.9 Ponderable Points......Page 538 Review Questions......Page 539 Key for Multiple Choice Questions......Page 540 17.2 FlowLayout......Page 541 17.3 BorderLayout......Page 543 17.4 GridLayout......Page 545 17.6 CardLayout......Page 547 17.7 Insets......Page 554 Review Questions......Page 555 Key for Multiple Choice Questions......Page 556 18.2 Collection Framework......Page 557 18.2.1 Collection Interface......Page 558 18.2.2 The List Interface......Page 559 18.2.3 The Set Interface......Page 560 18.3 The Collection Class......Page 561 18.4 ArrayList and LinkedList Classes......Page 562 18.4.2 The LinkedList Class......Page 565 18.5.1 The ListIterator Interface......Page 568 18.6.1 HashSet Class......Page 573 18.6.2 TreeSet Class......Page 574 18.7.1 The Map Interface......Page 577 18.7.3 The SortedMap Interface......Page 579 18.8 Working with Map Classes......Page 580 18.9 The Comparator Interface......Page 586 18.10 Historical Collection Classes......Page 589 18.11 Algorithm Support......Page 604 18.12 Ponderable Points......Page 609 Review Questions......Page 610 Multiple Choice Questions......Page 611 Key for Multiple Choice Questions ......Page 612 19.2 The StringTokenizer Class......Page 613 19.3 The Date Class......Page 615 19.4 The Calendar Class......Page 618 19.5 The Random Class......Page 622 19.6 Observable Class and Observer Interface......Page 624 19.7 The System Class......Page 629 19.7.1 Environment Variables/Property......Page 631 19.8.1 The Clone Method......Page 633 19.9 The class Class......Page 637 19.10 The Runtime Class......Page 642 19.11 The Process Class......Page 644 19.12 Wrapper Class......Page 647 19.12.2 The Byte, Short, Integer and Long Class......Page 648 19.12.4 Methods of Float/Double Class......Page 651 19.12.5 The Character Class......Page 654 19.12.6 The Boolean Class......Page 658 19.13 Ponderable Points......Page 660 Review Questions......Page 661 Multiple Choice Questions......Page 662 Key for Multiple Choice Questions......Page 663 20.1 How do Computers Talk to Each other via Internet?......Page 664 20.3 Internet Addressing with Java......Page 665 20.5 Sockets in Java......Page 668 20.5.2 The Server......Page 669 20.5.3 The Client......Page 670 20.5.4 Thread Chat Server and Client......Page 695 20.5.5 Datagram......Page 699 20.6 URL......Page 703 20.6.2 Creating Relative URLs......Page 704 20.7 Ponderable Points......Page 705 Key for Multiple Choice Questions......Page 706 21.1.1 Role of the JNI......Page 707 21.1.2 An Example of JNI......Page 708 21.1.3 Limitations of Using JNI......Page 711 21.2.1 Class and Interfaces for Serialization......Page 712 21.3 RMI......Page 718 21.3.1 Writing RMI Service......Page 719 21.4 Ponderable Points......Page 722 Multiple Choice Questions......Page 723 Key for Multiple Choice Questions ......Page 724 22.2 Drawing an Image......Page 725 22.3 The ImageObserver Interface......Page 728 22.3.1 Why Override ImageUpdate?......Page 729 22.4 Double Buffering......Page 732 22.5 The MediaTracker Class......Page 736 22.6 Producing Image Data......Page 739 22.7 Consuming Image Data......Page 746 Review Questions......Page 750 Key for Multiple Choice Questions ......Page 751 23.1 What is Swing?......Page 752 23.4 The JLabel Class......Page 753 23.5 The JButton Class......Page 754 23.6 The JTextField Class......Page 756 23.7 The JCheckBox Class......Page 757 23.8 The JRadioButton Class......Page 759 23.9 The JComboBox Class......Page 761 23.10 The JTabbedPane Class......Page 764 23.11 The JScrollPane Class......Page 766 23.12 The JSplitPane Class......Page 768 23.13 Dialogs......Page 769 23.14 File Selection Dialog......Page 777 23.15 The JColorChooser Class......Page 780 23.16 The JTable Class......Page 782 23.17 The JToolBar Class......Page 783 23.18 The JProgressBar Class......Page 786 23.19 The JSlider Class......Page 790 23.20 The JTree Class......Page 794 23.21 Examples of Menus......Page 797 23.22 Ponderable Points......Page 802 Multiple Choice Questions......Page 803 Key for Multiple Choice Questions......Page 804 24.1 Introduction......Page 805 24.2 Virtual Machine......Page 806 24.3 Virtual Machine Errors......Page 815 24.5 Invoking Methods Using Virtual Machine......Page 816 24.6 Class Instance and Virtual Machine......Page 819 24.7 Array and Virtual Machine......Page 823 24.8 Switch Statements and Virtual Machine......Page 828 24.9 Throwing and Handling Exceptions, and Virtual Machine......Page 833 24.11 Java Standard Extension API......Page 836 24.11.2 Java Media API......Page 837 24.11.3 Java Enterprise API......Page 838 24.12 The Java API Package......Page 839 24.13 Ponderable Points......Page 841 Multiple Choice Questions......Page 842 Key for Multiple Choice Questions......Page 843 S.2 Coding......Page 844 A1: Java Keyword Reference......Page 873 A 2.1 Executable Java Archives......Page 876 A2.2 How to Invoke DOS Command Using C/C++......Page 880 A 3.1 Introduction......Page 882 A3.2 The Manifest File......Page 883 A3.3 Examples of Jar Command Option......Page 884 Index......Page 885 Annotation "Java Programming"is an introductory level text that instils an understanding of basic concepts before gradually moving to advanced topics like swing, socket programming, JAVA native interface, remote method invocation and serialization. Programs are accompanied by complete explanations, and their output helps the reader better understand the logic behind them." Java Programming is an introductory level text that instils an understanding of basic concepts before gradually moving to advanced topics like swing, socket programming, JAVA native interface, remote method invocation and serialization. Programs are accompanied by complete explanations, and their output helps the reader better understand the logic behind them
دانلود کتاب Java programming [electronic resource