Java For Dummies

 
 
Standards Information Network (Verlag)
  • 7. Auflage
  • |
  • erschienen am 7. März 2017
  • |
  • 504 Seiten
 
E-Book | PDF mit Adobe-DRM | Systemvoraussetzungen
978-1-119-23557-6 (ISBN)
 
A new edition of the bestselling guide to Java
If you want to learn to speak the world's most popular programming language like a native, Java For Dummies is your ideal companion. With a focus on reusing existing code, it quickly and easily shows you how to create basic Java objects, work with Java classes and methods, understand the value of variables, learn to control program flow with loops or decision-making statements, and so much more!
Java is everywhere, runs on almost any computer, and is the engine that drives the coolest applications. Written for anyone who's ever wanted to tackle programming with Java but never knew quite where to begin, this bestselling guide is your ticket to success! Featuring updates on everything you'll encounter in Java 9--and brimming with tons of step-by-step instruction--it's the perfect resource to get you up and running with Java in a jiffy!
* Discover the latest features and tools in Java 9
* Learn to combine several smaller programs to create a bigger program
* Create basic Java objects and reuse code
* Confidently handle exceptions and events
If you're ready to jump into Java, this bestselling guide will help keep your head above water!
7. Auflage
  • Englisch
  • Somerset
  • |
  • USA
John Wiley & Sons Inc
  • Für Beruf und Forschung
  • Überarbeitete Ausgabe
  • 12,97 MB
978-1-119-23557-6 (9781119235576)
weitere Ausgaben werden ermittelt
Barry Burd, PhD, is a computer science professor at Drew University. The author of Java Programming for Android Developers For Dummies, Beginning Programming with Java For Dummies, and Android Application Development All-in-One For Dummies, Barry also writes for Server Side (theserverside.com), Android Authority (androidauthority.com), InfoQ.com and numerous other online publications.
1 - Title Page [Seite 3]
2 - Copyright Page [Seite 4]
3 - Table of Contents [Seite 7]
4 - Introduction [Seite 15]
4.1 - How to Use This Book [Seite 15]
4.2 - Conventions Used in This Book [Seite 16]
4.3 - What You Don't Have to Read [Seite 16]
4.4 - Foolish Assumptions [Seite 17]
4.5 - How This Book Is Organized [Seite 18]
4.5.1 - Part 1: Getting Started with Java [Seite 18]
4.5.2 - Part 2: Writing Your Own Java Program [Seite 18]
4.5.3 - Part 3: Working with the Big Picture: Object-Oriented Programming [Seite 19]
4.5.4 - Part 4: Smart Java Techniques [Seite 19]
4.5.5 - Part 5: The Part of Tens [Seite 19]
4.6 - Icons Used in This Book [Seite 19]
4.7 - Beyond the Book [Seite 20]
4.8 - Where to Go from Here [Seite 21]
5 - Part 1 Getting Started with Java [Seite 23]
5.1 - Chapter 1 All about Java [Seite 25]
5.1.1 - What You Can Do with Java [Seite 26]
5.1.2 - Why You Should Use Java [Seite 27]
5.1.3 - Getting Perspective: Where Java Fits In [Seite 28]
5.1.4 - Object-Oriented Programming (OOP) [Seite 30]
5.1.4.1 - Object-oriented languages [Seite 30]
5.1.4.2 - Objects and their classes [Seite 32]
5.1.4.3 - What's so good about an object-oriented language? [Seite 33]
5.1.4.4 - Refining your understanding of classes and objects [Seite 35]
5.1.5 - What's Next? [Seite 37]
5.2 - Chapter 2 All about Software [Seite 39]
5.2.1 - Quick-Start Instructions [Seite 39]
5.2.2 - What You Install on Your Computer [Seite 42]
5.2.2.1 - What is a compiler? [Seite 43]
5.2.2.2 - What is a Java Virtual Machine? [Seite 46]
5.2.3 - Developing software [Seite 53]
5.2.4 - What is an integrated development environment? [Seite 54]
5.3 - Chapter 3 Using the Basic Building Blocks [Seite 57]
5.3.1 - Speaking the Java Language [Seite 57]
5.3.1.1 - The grammar and the common names [Seite 58]
5.3.1.2 - The words in a Java program [Seite 59]
5.3.2 - Checking Out Java Code for the First Time [Seite 61]
5.3.3 - Understanding a Simple Java Program [Seite 62]
5.3.3.1 - The Java class [Seite 63]
5.3.3.2 - The Java method [Seite 64]
5.3.3.3 - The main method in a program [Seite 66]
5.3.3.4 - How you finally tell the computer to do something [Seite 67]
5.3.3.5 - Curly braces [Seite 69]
5.3.4 - And Now, a Few Comments [Seite 73]
5.3.4.1 - Adding comments to your code [Seite 74]
5.3.4.2 - What's Barry's excuse? [Seite 77]
5.3.4.3 - Using comments to experiment with your code [Seite 77]
6 - Part 2 Writing Your Own Java Programs [Seite 79]
6.1 - Chapter 4 Making the Most of Variables and Their Values [Seite 81]
6.1.1 - Varying a Variable [Seite 82]
6.1.1.1 - Assignment statements [Seite 84]
6.1.1.2 - The types of values that variables may have [Seite 85]
6.1.1.3 - Displaying text [Seite 88]
6.1.1.4 - Numbers without decimal points [Seite 89]
6.1.1.5 - Combining declarations and initializing variables [Seite 91]
6.1.2 - Experimenting with JShell [Seite 92]
6.1.3 - What Happened to All the Cool Visual Effects? [Seite 96]
6.1.4 - The Atoms: Java's Primitive Types [Seite 96]
6.1.4.1 - The char type [Seite 97]
6.1.4.2 - The boolean type [Seite 99]
6.1.5 - The Molecules and Compounds: Reference Types [Seite 101]
6.1.6 - An Import Declaration [Seite 105]
6.1.7 - Creating New Values by Applying Operators [Seite 107]
6.1.7.1 - Initialize once, assign often [Seite 111]
6.1.7.2 - The increment and decrement operators [Seite 112]
6.1.7.3 - Assignment operators [Seite 116]
6.2 - Chapter 5 Controlling Program Flow with Decision-Making Statements [Seite 119]
6.2.1 - Making Decisions (Java if Statements) [Seite 120]
6.2.1.1 - Guess the number [Seite 120]
6.2.1.2 - She controlled keystrokes from the keyboard [Seite 121]
6.2.1.3 - Creating randomness [Seite 124]
6.2.1.4 - The if statement [Seite 125]
6.2.1.5 - The double equal sign [Seite 126]
6.2.1.6 - Brace yourself [Seite 126]
6.2.1.7 - Indenting if statements in your code [Seite 127]
6.2.1.8 - Elseless in Ifrica [Seite 128]
6.2.2 - Using Blocks in JShell [Seite 130]
6.2.3 - Forming Conditions with Comparisons and Logical Operators [Seite 131]
6.2.3.1 - Comparing numbers [Seite 131]
6.2.3.2 - Comparing objects [Seite 132]
6.2.3.3 - Importing everything in one fell swoop [Seite 135]
6.2.3.4 - Java's logical operators [Seite 135]
6.2.3.5 - Vive les nuls! [Seite 138]
6.2.3.6 - (Conditions in parentheses) [Seite 139]
6.2.4 - Building a Nest [Seite 141]
6.2.5 - Choosing among Many Alternatives (Java switch Statements) [Seite 144]
6.2.5.1 - Your basic switch statement [Seite 144]
6.2.5.2 - To break or not to break [Seite 148]
6.2.5.3 - Strings in a switch statement [Seite 150]
6.3 - Chapter 6 Controlling Program Flow with Loops [Seite 153]
6.3.1 - Repeating Instructions Over and Over Again (Java while Statements) [Seite 154]
6.3.2 - Repeating a Certain Number of Times (Java for Statements) [Seite 157]
6.3.2.1 - The anatomy of a for statement [Seite 159]
6.3.2.2 - The world premiere of "Al's All Wet" [Seite 161]
6.3.3 - Repeating until You Get What You Want (Java do Statements) [Seite 164]
6.3.3.1 - Reading a single character [Seite 168]
6.3.3.2 - File handling in Java [Seite 168]
6.3.3.3 - Variable declarations and blocks [Seite 170]
7 - Part 3 Working with the Big Picture: Object-Oriented Programming [Seite 173]
7.1 - Chapter 7 Thinking in Terms of Classes and Objects [Seite 175]
7.1.1 - Defining a Class (What It Means to Be an Account) [Seite 176]
7.1.1.1 - Declaring variables and creating objects [Seite 178]
7.1.1.2 - Initializing a variable [Seite 181]
7.1.1.3 - Using an object's fields [Seite 181]
7.1.1.4 - One program [Seite 182]
7.1.1.5 - Public classes [Seite 182]
7.1.2 - Defining a Method within a Class (Displaying an Account) [Seite 183]
7.1.2.1 - An account that displays itself [Seite 185]
7.1.2.2 - The display method's header [Seite 186]
7.1.3 - Sending Values to and from Methods (Calculating Interest) [Seite 187]
7.1.3.1 - Passing a value to a method [Seite 190]
7.1.3.2 - Returning a value from the getInterest method [Seite 192]
7.1.4 - Making Numbers Look Good [Seite 194]
7.1.5 - Hiding Details with Accessor Methods [Seite 199]
7.1.5.1 - Good programming [Seite 199]
7.1.5.2 - Public lives and private dreams: Making a field inaccessible [Seite 202]
7.1.5.3 - Enforcing rules with accessor methods [Seite 204]
7.1.6 - Barry's Own GUI Class [Seite 204]
7.2 - Chapter 8 Saving Time and Money: Reusing Existing Code [Seite 211]
7.2.1 - Defining a Class (What It Means to Be an Employee) [Seite 212]
7.2.1.1 - The last word on employees [Seite 212]
7.2.1.2 - Putting your class to good use [Seite 214]
7.2.1.3 - Cutting a check [Seite 218]
7.2.2 - Working with Disk Files (a Brief Detour) [Seite 219]
7.2.2.1 - Storing data in a file [Seite 219]
7.2.2.2 - Copying and pasting code [Seite 220]
7.2.2.3 - Reading from a file [Seite 222]
7.2.2.4 - Who moved my file? [Seite 224]
7.2.2.5 - Adding directory names to your filenames [Seite 225]
7.2.2.6 - Reading a line at a time [Seite 226]
7.2.2.7 - Closing the connection to a disk file [Seite 227]
7.2.3 - Defining Subclasses (What It Means to Be a Full-Time or Part-Time Employee) [Seite 228]
7.2.3.1 - Creating a subclass [Seite 230]
7.2.3.2 - Creating subclasses is habit-forming [Seite 233]
7.2.4 - Using Subclasses [Seite 233]
7.2.4.1 - Making types match [Seite 235]
7.2.4.2 - The second half of the story [Seite 236]
7.2.5 - Overriding Existing Methods (Changing the Payments for Some Employees) [Seite 238]
7.2.5.1 - A Java annotation [Seite 240]
7.2.5.2 - Using methods from classes and subclasses [Seite 240]
7.3 - Chapter 9 Constructing New Objects [Seite 245]
7.3.1 - Defining Constructors (What It Means to Be a Temperature) [Seite 246]
7.3.1.1 - What is a temperature? [Seite 247]
7.3.1.2 - What is a temperature scale? (Java's enum type) [Seite 247]
7.3.1.3 - Okay, so then what is a temperature? [Seite 248]
7.3.1.4 - What you can do with a temperature [Seite 250]
7.3.1.5 - Calling new Temperature(32.0): A case study [Seite 253]
7.3.1.6 - Some things never change [Seite 255]
7.3.2 - More Subclasses (Doing Something about the Weather) [Seite 257]
7.3.2.1 - Building better temperatures [Seite 257]
7.3.2.2 - Constructors for subclasses [Seite 259]
7.3.2.3 - Using all this stuff [Seite 260]
7.3.2.4 - The default constructor [Seite 261]
7.3.3 - A Constructor That Does More [Seite 264]
7.3.3.1 - Classes and methods from the Java API [Seite 267]
7.3.3.2 - The SuppressWarnings annotation [Seite 268]
8 - Part 4 Smart Java Techniques [Seite 271]
8.1 - Chapter 10 Putting Variables and Methods Where They Belong [Seite 273]
8.1.1 - Defining a Class (What It Means to Be a Baseball Player) [Seite 274]
8.1.1.1 - Another way to beautify your numbers [Seite 275]
8.1.1.2 - Using the Player class [Seite 275]
8.1.1.3 - One class [Seite 278]
8.1.1.4 - Don't get all GUI on me [Seite 279]
8.1.1.5 - Tossing an exception from method to method [Seite 280]
8.1.2 - Making Static (Finding the Team Average) [Seite 281]
8.1.2.1 - Why is there so much static? [Seite 283]
8.1.2.2 - Meet the static initializer [Seite 284]
8.1.2.3 - Displaying the overall team average [Seite 285]
8.1.2.4 - The static keyword is yesterday's news [Seite 287]
8.1.2.5 - Could cause static [Seite 288]
8.1.3 - Experiments with Variables [Seite 291]
8.1.3.1 - Putting a variable in its place [Seite 291]
8.1.3.2 - Telling a variable where to go [Seite 294]
8.1.4 - Passing Parameters [Seite 299]
8.1.4.1 - Pass by value [Seite 299]
8.1.4.2 - Returning a result [Seite 301]
8.1.4.3 - Pass by reference [Seite 301]
8.1.4.4 - Returning an object from a method [Seite 303]
8.1.4.5 - Epilogue [Seite 306]
8.2 - Chapter 11 Using Arrays to Juggle Values [Seite 307]
8.2.1 - Getting Your Ducks All in a Row [Seite 307]
8.2.1.1 - Creating an array in two easy steps [Seite 310]
8.2.1.2 - Storing values [Seite 311]
8.2.1.3 - Tab stops and other special things [Seite 313]
8.2.1.4 - Using an array initializer [Seite 313]
8.2.1.5 - Stepping through an array with the enhanced for loop [Seite 314]
8.2.1.6 - Searching [Seite 316]
8.2.1.7 - Writing to a file [Seite 319]
8.2.1.8 - When to close a file [Seite 320]
8.2.2 - Arrays of Objects [Seite 321]
8.2.2.1 - Using the Room class [Seite 323]
8.2.2.2 - Yet another way to beautify your numbers [Seite 326]
8.2.2.3 - The conditional operator [Seite 327]
8.2.3 - Command Line Arguments [Seite 329]
8.2.3.1 - Using command line arguments in a Java program [Seite 331]
8.2.3.2 - Checking for the right number of command line arguments [Seite 333]
8.3 - Chapter 12 Using Collections and Streams (When Arrays Aren't Good Enough) [Seite 335]
8.3.1 - Understanding the Limitations of Arrays [Seite 335]
8.3.2 - Collection Classes to the Rescue [Seite 337]
8.3.2.1 - Using an ArrayList [Seite 337]
8.3.2.2 - Using generics [Seite 339]
8.3.2.3 - Wrapper classes [Seite 342]
8.3.2.4 - Testing for the presence of more data [Seite 344]
8.3.2.5 - Using an iterator [Seite 344]
8.3.2.6 - Java's many collection classes [Seite 345]
8.3.3 - Functional Programming [Seite 347]
8.3.3.1 - Solving a problem the old-fashioned way [Seite 350]
8.3.3.2 - Streams [Seite 352]
8.3.3.3 - Lambda expressions [Seite 353]
8.3.3.4 - A taxonomy of lambda expressions [Seite 356]
8.3.3.5 - Using streams and lambda expressions [Seite 356]
8.3.3.6 - Why bother? [Seite 362]
8.3.3.7 - Method references [Seite 364]
8.4 - Chapter 13 Looking Good When Things Take Unexpected Turns [Seite 365]
8.4.1 - Handling Exceptions [Seite 366]
8.4.1.1 - The parameter in a catch clause [Seite 370]
8.4.1.2 - Exception types [Seite 371]
8.4.1.3 - Who's going to catch the exception? [Seite 373]
8.4.1.4 - Catching two or more exceptions at a time [Seite 379]
8.4.1.5 - Throwing caution to the wind [Seite 380]
8.4.1.6 - Doing useful things [Seite 381]
8.4.1.7 - Our friends, the good exceptions [Seite 382]
8.4.2 - Handle an Exception or Pass the Buck [Seite 383]
8.4.3 - Finishing the Job with a finally Clause [Seite 390]
8.4.4 - A try Statement with Resources [Seite 393]
8.5 - Chapter 14 Sharing Names among the Parts of a Java Program [Seite 397]
8.5.1 - Access Modifiers [Seite 398]
8.5.2 - Classes, Access, and Multipart Programs [Seite 399]
8.5.2.1 - Members versus classes [Seite 399]
8.5.2.2 - Access modifiers for members [Seite 400]
8.5.2.3 - Putting a drawing on a frame [Seite 403]
8.5.2.4 - Directory structure [Seite 405]
8.5.2.5 - Making a frame [Seite 406]
8.5.3 - Sneaking Away from the Original Code [Seite 408]
8.5.3.1 - Default access [Seite 410]
8.5.3.2 - Crawling back into the package [Seite 413]
8.5.4 - Protected Access [Seite 414]
8.5.4.1 - Subclasses that aren't in the same package [Seite 414]
8.5.4.2 - Classes that aren't subclasses (but are in the same package) [Seite 416]
8.5.5 - Access Modifiers for Java Classes [Seite 420]
8.5.5.1 - Public classes [Seite 420]
8.5.5.2 - Nonpublic classes [Seite 420]
8.6 - Chapter 15 Fancy Reference Types [Seite 423]
8.6.1 - Java's Types [Seite 423]
8.6.2 - The Java Interface [Seite 424]
8.6.2.1 - Two interfaces [Seite 425]
8.6.2.2 - Implementing interfaces [Seite 426]
8.6.2.3 - Putting the pieces together [Seite 429]
8.6.3 - Abstract Classes [Seite 431]
8.6.3.1 - Caring for your pet [Seite 434]
8.6.3.2 - Using all your classes [Seite 436]
8.6.4 - Relax! You're Not Seeing Double! [Seite 438]
8.7 - Chapter 16 Responding to Keystrokes and Mouse Clicks [Seite 441]
8.7.1 - Go On . . . Click That Button [Seite 442]
8.7.1.1 - Events and event handling [Seite 444]
8.7.1.2 - Threads of execution [Seite 445]
8.7.1.3 - The keyword this [Seite 446]
8.7.1.4 - Inside the actionPerformed method [Seite 448]
8.7.1.5 - The serialVersionUID [Seite 449]
8.7.2 - Responding to Things Other Than Button Clicks [Seite 450]
8.7.3 - Creating Inner Classes [Seite 455]
8.8 - Chapter 17 Using Java Database Connectivity [Seite 459]
8.8.1 - Creating a Database and a Table [Seite 460]
8.8.1.1 - What happens when you run the code [Seite 461]
8.8.1.2 - Using SQL commands [Seite 461]
8.8.1.3 - Connecting and disconnecting [Seite 463]
8.8.2 - Putting Data in the Table [Seite 464]
8.8.3 - Retrieving Data [Seite 465]
8.8.4 - Destroying Data [Seite 467]
9 - Part 5 The Part of Tens [Seite 469]
9.1 - Chapter 18 Ten Ways to Avoid Mistakes [Seite 471]
9.1.1 - Putting Capital Letters Where They Belong [Seite 471]
9.1.2 - Breaking Out of a switch Statement [Seite 472]
9.1.3 - Comparing Values with a Double Equal Sign [Seite 472]
9.1.4 - Adding Components to a GUI [Seite 473]
9.1.5 - Adding Listeners to Handle Events [Seite 473]
9.1.6 - Defining the Required Constructors [Seite 473]
9.1.7 - Fixing Non-Static References [Seite 474]
9.1.8 - Staying within Bounds in an Array [Seite 474]
9.1.9 - Anticipating Null Pointers [Seite 475]
9.1.10 - Helping Java Find Its Files [Seite 476]
9.2 - Chapter 19 Ten Websites for Java [Seite 477]
9.2.1 - This Book's Website [Seite 477]
9.2.2 - The Horse's Mouth [Seite 477]
9.2.3 - Finding News, Reviews, and Sample Code [Seite 478]
9.2.4 - Got a Technical Question? [Seite 478]
10 - Index [Seite 479]
11 - EULA [Seite 507]

Dateiformat: PDF
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat PDF zeigt auf jeder Hardware eine Buchseite stets identisch an. Daher ist eine PDF auch für ein komplexes Layout geeignet, wie es bei Lehr- und Fachbüchern verwendet wird (Bilder, Tabellen, Spalten, Fußnoten). Bei kleinen Displays von E-Readern oder Smartphones sind PDF leider eher nervig, weil zu viel Scrollen notwendig ist. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Bitte beachten Sie bei der Verwendung der Lese-Software Adobe Digital Editions: wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Download (sofort verfügbar)

20,99 €
inkl. 7% MwSt.
Download / Einzel-Lizenz
PDF mit Adobe-DRM
siehe Systemvoraussetzungen
E-Book bestellen