Java entry 1.2.3-an old bird's Java learning experience

Source: Internet
Author: User
Tags driver manager

Java entry 1.2.3-an old bird's Java learning experience

Basic Information

Author: Meng
Press: Tsinghua University Press
ISBN: 9787302217831
Mounting time:
Published on: February 1, March 2010
Start: 16
Other Details View: http://www.china-pub.com/196571

 

Edit recommendations

Java programming skills
From the perspective of readers without programming experience, the Experts teach readers to learn Java
16-hour multimedia teaching video, efficient and intuitive
Cracking the difficulties and doubts that may arise when getting started with Java
It makes learning easier and easier.
Through a lot of metaphor, analogy, comparison, illustration and other explanations, the learning effect is good
Each Syntax of Java provides one or more examples.
A large number of Flowcharts are used to represent the execution process of the program, and a structure diagram is used to represent the internal state of the program.
At the end of each chapter, typical exercise questions are provided, allowing readers to exercise in time, consolidate and improve, and provide reference answers.

 

Directory

1st Basic Java syntax
Chapter 2 let your first Java program run 2
Tutorial video: 19 minutes
1.1 want to change the world with Java? 2
1.1.1 what are the advantages of Java? 2
1.1.2 where is Java? 3
1.2 get ready for Java 3
1.2.1 download JDK 4
1.2.2 install JDK 5
1.2.3 configure environment variable 6
1.2.4 test environment installation successful 8
1.2.5 what if it fails? 9
1.3 let your first program run 10
1.3.1 write your own Hello World source program 10
1.3.2 compile your own helloworld Program 11
1.3.3 run the code 13
1.4 preliminary study Hello world 14
1.4.1 class: A class of objects in the Java World 14
1.4.2 method: functions of an object 15
1.4.3 main () method: the starting point of all Java program execution 15

. 1.5 glossary 16
1.5.1 JDK and Java platform 16
1.5.2 Java compiler (Java compiler) 17
1.5.3 Java class library (Java class libraries) 17
1.5.4 Java Virtual Machine 17
1.5.5 whole helloworld process 17
1.6 conclusion: we learned how to compile and run a Java program! 18
1.7 exercise 19
Chapter 2 build your own integrated development environment 20
Tutorial video: 31 minutes
2.1 install the integrated development environment 20
2.1.1 what are the integrated development environments? 20
2.1.2 install eclipse 21
2.2 eclipse page introduction 23
2.2.1 start eclipse 23
2.2.2 eclipse perspective 24
2.2.3 eclipse menu 25
2.2.4 eclipse tool bar 25
2.2.5 eclipse auxiliary view area 25
2.2.6 package explorer 26 in eclipse
2.2.7 eclipse source code editor 26
2.2.8 eclipse setting window 26
2.2.9 other views in eclipse 27
2.3 How to Use eclipse 28
2.3.1 create your first project in eclipse 28
2.3.2 compile the helloworld program 29 in eclipse
2.3.3 run Hello World 31 through eclipse
2.4 conclusion: eclipse-powerful functions 32
2.5 exercise 32
Chapter 3 basic data types and operators in Java 33
Tutorial video: 1 hour 5 minutes
3.1 basic data type 33 in Java
3.1.1 basic data type-Data Atom 33 in Programming Language
3.1.2 introduction to basic data types in Java 34
3.1.3 value range of basic data types 34
3.2 Java operator 36
3.2.1 concept of variables 36
3.2.2 episode: Statement 37 in Java
3.2.3 specification for creating a variable and a variable name 37
3.2.4 basic operators and expressions in Java 39
3.2.5 boolean operator 43 in Java
3.3 difficulties in basic data type operations 47
3.3.1 forced type conversion-where is the decimal number 48?
3.3.2 The type conversion is carried out quietly in the Operation 50
3.3.3 forced type conversion takes precedence over 52
3.3.4 equal sign is actually not simple 52
3.3.5 be careful when using floating point numbers for comparison 53
3.3.6 Boolean and char 55
3.3.7 do not use a variable that has not been created 57
3.3.8 string -- char string necklace 58
3.3.9 Escape Character-61 characters cannot be written
3.4 Summary: basic data types-Basics of all data and operations in Java 63
3.5 exercise 65
Chapter 1 procedure of program execution in Java 67
Tutorial video: 1 hour and 57 minutes
4.1 sequential execution 67
4.2 Use if-Else To let the program know how to judge 68
4.2.1 If statement 68
4.2.2 if statement nesting 71
4.2.3 If-else statement 73
4.2.4 if-else statement nesting 75
4.3 Use while for loop 76
4.3.1 use the while statement 76
4.3.2 Use do-while statement 79
4.4 use for loop 80
4.4.1 auto increment and auto increment operations 80
4.4.2 for statement 82
4.4.3 for statement omitted Form 84
4.5 what can't be said in a statement 84
4.5.1 be careful with the variable 85 created in complex statements
4.5.2 do not let the number of cycles increase by 86
4.5.3 nested loop 87
4.6 continue keyword and break keyword 88
4.6.1 continue keyword 88
4.6.2 break keyword 89
4.7 use switch to redirect 90
4.8 examples 94
4.8.1 read data from the console 94
4.8.2 loop 96 in the checkout procedure
4.9 conclusion: Java is not a rectal 98
4.10 exercise 99
Chapter 2 array 5th
Tutorial video: 35 minutes
5.1 What is array 100
5.1.1 hypothesis: If you need to define the variables one by one, 100
5.1.2 Initial Study on arrays 101
5.1.3 array -- collect 104 together
5.1.4 The value of the array element contains Qian Kun 105
5.1.5 concise syntax for creating arrays 106
5.2 "name" and "real" 107 of the array
5.2.1 array 107 separated by "name" and "real"
5.2.2 array 109 with multiple real names
5.2.3 confusion caused by "real" and "multiple" names "111
5.3 multi-dimensional array 114
5.3.1 what is multi-dimensional array 114
5.3.2 essence of multi-dimensional array 115
5.4 array large-scale training 123
5.4.1 easy query of the class score of 123
5.4.2 easy query of All-school scores: 124
5.4.3 Yang Hui triangle 125
5.5 Summary: quick and convenient array 129
5.6 exercise 129
2nd advanced Java syntax
Chapter 2 Java class and object 6th
Tutorial video: 59 minutes
6.1 driving cars are heading towards the class world 132
6.1.1 automobile problems 132
6.1.1 composition 134
6.1.3 use custom car 136
6.1.4 class and object 139
6.1.5 storage of source files 141
6.1.5 comprehension reference 143
6.1.7 null keyword 145
6.2 clever use of attributes in the class 147
6.2.1 give each variable an initial value of 147 in the class
6.2.2 define your own reference 147
6.2.3 tips for using the dot operator 148
6.2.4 array of the class 149
6.3 conclusion: Java is actually a world of classes and objects 152
6.4 exercise 153
Chapter 2 methods in Java-provide a variety of functions for automobiles 7th
Tutorial video: 2 hours and 55 minutes
7.1 method: let the car start 154
7.1.1 problem caused: Start auto 154
7.1.2 so what is the method? 155
7.1.3 Initial Study of method call process 156
7.2 Java common method components 157
7.2.1 Access Controller: Public 158
7.2.2 return value and keyword void 158
7.2.3 method name 159
7.2.4 parameter list 159
7.2.5 method body 160
7.2.6 method 160
7.3 method parameters: accelerate the vehicle by 161
7.3.1 method parameters: allow the vehicle to accelerate 161
7.3.2 what are the differences between methods with parameters? 162
7.3.3 let the method have multiple parameters 163
7.4 return value: Is the car speeding? 164
7.4.1 write a method with a return value 164
7.4.2 call method with return value 165
7.4.3 what happened? How to Use the return value of the method? 166
7.4.4 use the return end method 166
7.5 Method overload: Limit 168 for vehicle acceleration
7.5.1 what is method signature 168
7.5.2 what is heavy load? Why is heavy load required? 168
7.5.3 Method for adding heavy loads to vehicles 169
7.5.4 test 169
7.5.5 duplicate loading may cause misunderstanding in two places-return type and parameter name 170
7.5.6 the most difficult part in heavy load -- Parameter Matching Principle 171
7.6 use the instance of the class as the method parameter 172
7.6.1 overtaking method: Use a class instance for parameter 172
7.6.2 call this method 173
7.6.3 what happened 174
7.7 Food addition: local variables and instance variables 175
7.7.1 what is local variable 175
7.7.2 what is instance variable 177
7.8 this keyword: point to the object's own reference 177
7.8.1 problem detected: When the instance variable and the local variable are named again 177
7.8.2 this keyword 178, which is often hidden
7.8.3 call method 179 in a method
7.9 constructor 181
7.9.1 constructor METHOD 181
7.9.2 use constructor 182
7.9.3 leave a construction method without parameters -- assign an initial value of 183 to an important attribute
7.9.4 call the constructor in constructor 184
7.10 method summary 185
7.10.1 class 186 used in this example
7.10.2 use a routine to introduce the knowledge of this Chapter 189
7.11 conclusion: multi-faceted understanding of Java method 191
7.12 exercise 192
Chapter 2 naming conventions and comments of packages in Java 8th
Tutorial video: 43 minutes
8.1 Java package 193
8.1.1 Java package 193
8.1.2 use package 194 in eclipse
8.1.3 the next package in the sky is 197
8.1.4 what is included in the package? 197
8.2 Import Statement: simplified to 200
8.2.1 Import Statement 200
8.2.2 201 for all classes in a pack
8.2.3 small problems caused by the Import Statement 202
8.2.4 default introduced package 204
8.3 naming conventions overview 204
8.4 notes 205 in Java
8.4.1 comment 205 on a single line using a double slash
8.4.2 multi-line comment 206
8.4.3 javadoc comments 206
8.5 conclusion: the package makes Java classes clearer and more elegant 208
8.6 exercise 209
Chapter 2 looking at the array, string, and main () method 9th
Tutorial video: 29 minutes
9.1 arrays are also class 210
9.1.1 get the length of the array 210
9.1.2 meal addition: unchangeable final variable 211
9.1.3 multi-dimensional array length 212
9.1.4 clone () method of one-dimensional array 212
9.1.5 when the array type is no longer the basic data type 214
9.1.6 multi-dimensional array clone () method 217
9.2 old friend string class 220
9.2.1 traverse the string character 220
9.2.2 obtain part 222 of the string
9.2.3 determine whether two strings are equal to 223
9.2.4 judge the start and end of a string 225
9.2.5 split string 225
9.2.6 search for a substring or character 226 in a string
9.2.7 Replace the content in the string 226
9.2.8 String object-rock lettering 227
9.3 optimal partner of the string class-stringbuffer class 227
9.3.1 stringbuffer: professionally manipulated character 228
9.3.2 neither string nor stringbuffer can be less than 229
9.4 The most familiar stranger: Main () method 229
9.4.1 parameters of the main () method 229
9.4.2 static key 232
9.4.3 when the method encounters the static keyword 233
9.5 conclusion: Learn to use methods in the Class 235
9.6 exercise 236
Chapter 2 Inheritance and polymorphism 10th
Tutorial video: 1 hour and 55 minutes
10.1 inheritance-optimal solution 237
10.1.1 fruit before meals: Access Controller for instance variables 237
10.1.2 everything starts from car 238
10.1.3 Class 1 vehicle, class 1 241
10.1.4 splitting is also troublesome. 244
10.1.5 use inheritance -- Solve the Problem 245
10.1.6 use bus class 248
10.1.7 single inheritance 248 in Java
Class Diagram 249 in 10.1.8 Java
10.1.9 ancestor of all categories -- Object Class 250
10.2 subclass object? Parent class object? 251
10.2.1 parent with child row 251
10.2.2 when the constructor encounters an inheritance 254
10.2.3 remember to give the Class A non-parameter constructor 255
10.2.4 call the constructor in the parent class 256
10.2.5 the object will also "face" 258
10.2.6 follow the syntax and correct "face change" 262
10.3 coverage -- with inheritance 264
10.3.1 when the method is no longer general 264
10.3.2 overwrite -- making it hard to adjust 265
10.3.3 overwrite -- Method 270 called
The syntax covered by 10.3.4 is not simple 272
10.3.5 more complex use coverage case 274
10.3.6 overwrite -- Pandora Magic Box 276 that has to be opened
10.3.7 using super to call methods and attributes in the parent class 278
10.4 polymorphism (polymorphism) and other 279
10.4.1 polymorphism -- runner-up result 280
10.4.2 reload is not simple. 280
10.4.3 build team 283 using Polymorphism
10.5 open fog in a multi-state environment 284
10.5.1 mysterious class 284
10.5.2 coverage is no longer mysterious 285
10.5.3 instanceof operator -- let the object tell you who its class is 286
10.6 conclusion: inheritance and polymorphism make the world colorful 287
10.7 exercise 290
Chapter 2 modifier (qualifier) 11th
Tutorial video: 26 minutes
11.1 episode: name of part of the class 291
Modifier 11.2 in class 292
11.2.1 non-modifier class 292
11.2.2 class visibility 293
11.2.3 final -- make the class not inherited 295
11.2.4 understand final keywords 296
11.2.5 conclusion: Class modifiers 297
11.3 method modifier 297
11.3.1 method Access Control letter 298
11.3.2 public: unlimited modifier 299
11.3.3 protected: only visible to the subclass and class of the same package 300
11.3.4 default Controller: Only 301 visible in this package
11.3.5 PRIVATE: only 303 visible to this class
11.3.6 understand 4 access controllers 304
11.3.7 Access Controller visibility summary 306
11.3.8 coverage problems caused by access controllers 306
11.3.9 final: The method cannot be overwritten by 310
11.3.10 review static method 311
11.3.11 static method -- Concept 312 in the class range
11.3.12 why is the static method "static" 314
11.4 variable modifier 316
11.4.1 variable methods all member 317
11.4.2 variable access control letter 317
11.4.3 use private to modify the member variable 318 of the class
11.4.4 what if I use private? 320
11.4.5 variable overwrite 322
11.4.6 use final to modify member variable 325
11.4.7 static member variable 326
11.4.8 modifier of local variables 326
11.4.9 when final encounters a reference type member variable 327
11.5 conclusion: modifier has a 328 role
11.6 exercise 330
Chapter 4 interface 12th
Tutorial video: 29 minutes
12.1 bicycle problems 331
12.1.1 record 331 of vehicles on the road
12.1.2 problematic bike 335
12.1.3 careful analysis of recordtransport () method 338
12.2 initial interface 339
12.2.1 prepare the required class 339
12.2.2 recognition interface code composition 340
12.2.3 what is interface 341
12.2.4 only one step is required to use the interface -- Implement interface 342
12.2.5 interface -- let the class set multiple types in one 344
12.2.6 simplify recordtransport () method 347
12.3 probing interface 349
12.3.1 review program 349 in the previous section
12.3.2 API-Oriented Programming 351
12.3.3 "abstract" 353
12.3.4 reduced interface size by 355
12.3.5 implement multiple interfaces 355
12.3.6 interface variable 357
12.3.7 interface inheritance 358
12.3.8 type 359 in matching Abstract METHODS
12.3.9 empty interface 361
12.4 conclusion: the difficulty of the interface is when to use 362
12.5 exercise 364
Chapter 2 abstract classes and internal classes 13th
Tutorial video: 26 minutes
13.1 abstract class 365
13.1.1 people class 365 who do not know how to say hello
13.1.2 when the class has an abstract method 367
13.1.3 explanation of abstract class syntax 368
13.1.4 understanding the role of an abstract class 369
13.2 inner class 370
13.2.1 member class 370
13.2.2 partial internal class 372
13.3 member internal class 374
13.3.1 use Member internal class 374
13.3.2 modifier of the member's internal class 375
13.3.3 use internal class 376 outside the class
13.3.4 non-static internal class features 378
13.3.5 attributes of the internal class of the external class access member 382
13.3.6 static member internal class 383
13.4 local internal class 384
13.4.1 local internal class "local" 385
13.4.2 "internal class" of local internal class 386
13.4.3 use partial internal class 388
13.5 anonymous internal class (anonymous inner classes) 389
13.5.1 preparations 389
13.5.2 syntax 389 for anonymous internal classes
13.5.3 use Anonymous class 390 through the interface
13.5.4 use Anonymous class 391 through abstract classes
13.6 categories.
13.7 Summary: various categories 395
13.8 exercise 397
Chapter 2 Exception Handling Mechanism of Java 14th
Tutorial video: 36 minutes
14.1 recognition exception 398
14.1.1 when is the exception 398?
14.1.2 what is an exception 401
14.1.3 Java exception mechanism process 401
14.2 throw an exception 403
14.2.1 exception class parent class -- throwable 403
14.2.2 throw an exception 404 using throw in the code
14.2.3 use throws 407 in method declaration
14.2.4 construct custom exception class 409
14.2.5 use a custom exception class 410
14.3 exception transfer 411
14.3.1 throw the most precise exception type 411
14.3.2 Java exception transfer 412
14.3.3 figure 414
14.4 Exception Handling 418
14.4.1 catch the exception 418
14.4.2 figure 421 exception handling process
14.4.3 handling of multiple types of exceptions 424
14.4.4 try-catch-finally statement 426
14.4.5 try-finally statement 431
14.4.6 use catch statement 432
14.5 exception type 433
14.5.1 inheritance relationships of three classes 433
14.5.2 the exception class 434 that must be processed
14.5.3 flexible runtimeexception class 434
14.5.4 error class 435 not processed
14.6 conclusion: Termination error spread 435
14.7 exercise 437
Chapter 2 multi-thread programming 15th
Tutorial video: 1 hour, 14 minutes
15.1 threads -- 438 of the machine executing the code
15.1.1 thread-basic unit of code execution 438
15.1.2 concert Model 440
15.2 Thread Programming in Java 443
15.2.1 thread-class thread 443
15.2.2 override the run () method 444 of the thread class
15.2.3 use the runnable interface 446
15.2.4 two threads 448
15.3 deep learning Thread class 449
15.3.1 thread name 449
15.3.2 get the current thread 451
15.3.3 "Sleep" the thread 453
Story of more than 15.4 threads 457
15.4.1 a program with multiple threads 457
15.4.2 agency model 459
15.4.3 a simple community routine 461
Synchronization of more than 15.5 threads 463
15.5.1 synchronized keyword 463 for Thread Synchronization
15.5.2 deep learning about the synchronized keyword 468
15.5.3 static synchronization method 469
15.5.4 non-static synchronization method 472
15.5.5 bank troubles-474 of accounts are messy
15.5.6 multi-angle understanding of synchronization method 481
15.5.7 use of gossip synchronization 484
15.5.8 Synchronous Code block 485
15.5.9 lock 486
15.5.10 thread synchronization-Wait () and notify () Methods 488
15.5.11 the order of wait and sort y is 491.
15.6 conclusion: thread-code executor 494
15.7 exercise 495
3rd Advanced Java programming
Chapter 2 how to learn this article 16th
Tutorial video: 15 minutes
16.1 think about writing more and practice more 498
16.2 of the industry specializes in 498
16.3 split the problem, hitting 500 one by one
16.4 read javadoc 500
16.5 conclusion: the big training team will start 506 immediately
16.6 exercise 507
Chapter 1 common programming knowledge 17th
Tutorial video: 18 minutes
17.1 comparison of objects 508
Method 17.1.1 hashcode () 508
17.1.2 equals () method 509
17.1.3 comparison of objects equals () method 509
17.2 collection class framework in Java 510
17.2.1 interface 510 in the Collection framework
17.2.2 list API 511
17.2.3 use arraylist 512
17.2.4 set API 516
17.2.5 use hashset class 517
17.2.6 list and set 518
17.3 generic introduction 518
17.3.1 program 519 when no generic type exists
17.3.2 use generic -- avoid force type conversion to 520
17.4 map interface 522
17.4.1 understanding map 522
17.4.2 use hashmap 523
17.5 Character Set and encoding 524
17.5.1 Character Set 524
17.5.2 encoding 525
17.5.3 about character set applets 526
17.6 conclusion: lay a solid foundation for programming 529
17.7 exercise 530
Chapter 2 Java file programming and Java file I/O 18th
Tutorial video: 9 minutes
18.1 file programming in Java 531
18.1.1 File class 531
18.1.2 create and delete files 532
18.1.3 list files and folders 533
18.1.4 rename file 535
18.2 Java I/O programming 536
18.2.1 understand the stream 536 in Java
18.2.2 write data to the file 538
18.2.3 read data from the file 539
18.2.4 read data from the console 541
18.2.5 use the output stream to write data 543
18.2.6 use an input stream to read data 545
18.3 Summary: File class and input/output Mechanism in Java 546
18.4 exercise 547
Chapter 2 Java socket programming 19th
Tutorial video: 8 minutes
19.1 IP address and port number 548
19.1.1 IP Address -- computer ID 548
19.1.2 port number -- communication window 549
19.1.3 network, IP address and port number 551
19.2 Java TCP programming 551
19.2.1 data transmission protocol 552
19.2.2 TCP Data Transmission Mode 552
19.2.3 first TCP applet 553
19.3 Java UDP programming 557
19.3.1 UDP data transmission mode 557
19.3.2 use UDP protocol to send and receive data 558
19.3.3 Difference Between TCP and UDP 560
19.4 conclusion: extend the program to 561 of the Network
19.5 exercise 561
Chapter 2 Java swing programming 20th
Tutorial video: 14 minutes
20.1 Java swing programming 562
4.1.1.1 introduction to graphic user interface programming 562
V1.1.2 component 563
Release 1.3 layout manager (layout manager) 563
Statement 1.4 event handling 564
20.2 swing basic components 565
20172.1 window (jframe) 565
Worker 2.2 swing thread 567
2.3 the originator of the swing component-jcomponent 567
20172.4 swing panel 568
Labels 568 in swing
570 text box in swing
571 text fields in swing
Combo 572 in swing 2.8
Button 573 in swing
20.3 swing layout manager 574
4.1.3.1 The simplest flowlayout 574
Borderlayout 574 in the Southeast and Northwest China
Algorithm 3.3 mean segmentation -- gridlayout 576
Raise 3.4 The most powerful layout manager-gridbaglayout 577
Ike3.5 use multiple layout managers 579
20.4 swing event handling 581
4.1.4.1 event transfer and encapsulation 581
Listen 4.2 event listener-event handler 582
584 swing Event Processing Mechanism
4.4 event listener compilation 586
Listen 4.5 how to learn more events 588
20.5 conclusion: no longer relying on console 588
20.6 exercise 588
Chapter 1 programming, what is needed is imagination and perseverance 21st
Tutorial video: 13 minutes
21.1 programming prelude 589
21.1.1 building block 589 in the hands
21.1.2 use your imagination 590
21.1.3 determine the features of the program 591
21.2 chat window program 591
21.2.1 chat program design 591
21.2.2 design program running effect 593
21.2.3 UDP message sending and receiving module 595
21.2.4 graphic user interface module 598
21.2.5 Message Processing Module 600
21.2.6 a more common chat program 601
21.3 conclusion: programming is essential for exercise 602
21.4 exercise 602
Chapter 4 JDBC entry 22nd
Tutorial video: 11 minutes
22.1 basic jdbc api 603
22.1.1 what is JDBC 603
22.1.2 drivermanager -- driver manager 605
22.1.3 connection interface 606
606 statement Interface
22.1.5 preparedstatement interface 606
22.1.6 resultset API 607
22.1.7 JDBC-ODBC bridge 607
22.2 a simple procedure for operating a database 608
22.2.1 program execution result 608
22.2.2 program design and module division 609
22.2.3 prepare the data source 610
22.2.4 implementation of the database operation module 610
22.2.5 Implementation of the graphic user interface module 611
22.3 Summary: Powerful JDBC standard 613
22.4 exercise 613

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.