1. Trang chủ
  2. » Công Nghệ Thông Tin

Beginning Programming with Java for Dummies 2nd phần 1 docx

41 342 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 41
Dung lượng 1,09 MB

Nội dung

[...]... xii Beginning Programming with Java For Dummies, 2nd Edition Building a Nest 17 0 Nested if statements 17 1 Cascading if statements 17 2 Enumerating the Possibilities 17 5 Creating an enum type .17 6 Using an enum type 17 6 Creating a project with two Java source files 17 9 Chapter 11 : How to Flick a Virtual Switch 18 1 Meet the switch... computer stores the word internally as 010 10 011 011 1 010 0 011 000 01 011 10 010 011 1 010 0 That feeling you get of seeing a friendly looking five-letter word is your interpretation of the computer screen’s pixels, and nothing more Computers break everything down into very low-level, unfriendly sequences of zeros and ones, and then put things back together so that humans can deal with the results So what happens... operators .11 7 Size Matters 11 8 Chapter 8: Numbers? Who Needs Numbers? 12 1 Characters 12 2 I digress 12 3 One character only, please 12 5 Variables and recycling 12 5 When not to reuse a variable 12 7 Reading characters 12 9 The boolean Type 13 1 Expressions and conditions 13 2 Comparing numbers;... characters 13 3 The Remaining Primitive Types 13 8 Part III: Controlling the Flow .13 9 Chapter 9: Forks in the Road 14 1 Making Decisions (Java if Statements) 14 3 Looking carefully at if statements 14 3 A complete program 14 7 Indenting if statements in your code .15 0 Variations on the Theme .15 0 Or else what? 15 1 Packing... 15 3 Some handy import declarations .15 5 Chapter 10 : Which Way Did He Go? 15 7 Forming Bigger and Better Conditions 15 7 Combining conditions: An example 15 9 When to initialize? 16 1 More and more conditions 16 2 Using boolean variables 16 5 Mixing different logical operators together 16 6 Using parentheses 16 8 xi xii Beginning. .. place 10 0 Combining variable declarations .10 1 Table of Contents Chapter 7: Numbers and Types 10 3 Using Whole Numbers 10 3 Reading whole numbers from the keyboard 10 5 What you read is what you get 10 6 Creating New Values by Applying Operators 10 8 Finding a remainder 10 8 The increment and decrement operators .11 1 Assignment... classes and methods 311 Calling an object’s methods 312 Combining and using data . 313 Static Methods 313 Calling static and non-static methods . 314 Turning strings into numbers 315 Turning numbers into strings 316 How the NumberFormat works 318 Understanding the Big Picture 318 Packages and import declarations 319 Shedding light on the... writing Java code Just fill in the blanks and don’t look back.” In a sense, this is true You can’t break anything by writing Java code, so you’re always free to experiment 2 Beginning Programming with Java For Dummies, 2nd Edition But I have to be honest If you don’t understand the bigger picture, writing a program is difficult That’s true with any computer programming language — not just Java If... All There Is to It? . 31 Chapter 3: Running Programs 33 Running a Canned Java Program 33 Typing and Running Your Own Code 38 x Beginning Programming with Java For Dummies, 2nd Edition Part II: Writing Your Own Java Programs 45 Chapter 4: Exploring the Parts of a Program 47 Checking Out Java Code for the First Time 47 Behold!... 3 01 Some questions and answers 302 xiii xiv Beginning Programming with Java For Dummies, 2nd Edition Chapter 18 : Using Methods and Variables from a Java Class 303 The String Class 303 A simple example .304 Putting String variables to good use 305 Reading and writing strings 306 Using an Object’s Methods 307 Comparing strings 310 The . y0 w1 h0" alt="" 01_ 588745 ffirs.qxd 3 /16 /05 9: 31 PM Page iv by Barry Burd Beginning Programming with Java ™ FOR DUMmIES ‰ 2ND EDITION 01_ 588745 ffirs.qxd 3 /16 /05 9: 31 PM Page i Beginning Programming. 11 1 Assignment operators 11 7 Size Matters 11 8 Chapter 8: Numbers? Who Needs Numbers? . . . . . . . . . . . . . . . . . . . .12 1 Characters 12 2 I digress . . . 12 3 One character only, please 12 5 Variables. Virtual Switch 18 1 Chapter 12 : Around and Around It Goes 19 5 Chapter 13 : Piles of Files: Dealing with Information Overload 215 Chapter 14 : Creating Loops within Loops 233 Chapter 15 : The Old Runaround

Ngày đăng: 12/08/2014, 10:21

TỪ KHÓA LIÊN QUAN