20165103 2017-2018-2 "Java program Design" 7th Week Study summary Textbook study summarySummarize what you learned this week as simple as possible.Problems in teaching materials learning and the solving processTextbook learning Problems first go to https://shimo.im/doc/1i1gldfsojIFH8Ip/to see, if others did not ask the same question, you can edit the document to
20145316 "Java program design" The 1th Week study summary textbook Learning content SummaryFirst, understand the Java language:1.Java is an object-oriented programming language that can compose cross-platform applications. Java technology, with its versatility, efficiency, p
framework when I write the Framework (house), you may still be in primary school, and you will not be able to write programs yet.How can I write a framework program that calls into the class (Windows and doors) you write later? Because there is no way to know the name of the class to be called when the program is written, it is not possible to make an instance object of a class directly in the program, but to do so by reflection.The synthesis case first creates an instance object of ArrayList a
needs to use, the JRE is the Java execution Environment, and the JVM is a Java virtual machine, which is included in the JRE.3.java HelloWorld Command, what does this parameter refer to in HelloWorld?A: The first defined class name.4. What is the purpose of setting the path variable?A: In order to run a Java program c
, Android developmentThe goal is to be able to pass the exam, the farther goal is to be able to make a Web page or a simple small game.3. Using the code cloud to manage Java code4. Experimental summary This experiment harvest very big, feel oneself still have a lot of place that do not understand, need to the classmate teacher in time consult. Because it's the first time you've touched Java, many new concep
be assigned to the byte type is enclosed in parentheses. System.out.println (x); In addition the char type can also be converted to the int type because the data of type char is 16 bits of data. Oh, int is a 32-bit representation of the relationship between them with that asscii table, so you can type the conversion. char x = ' a '; Define a variable X of type char and assign a value of ' a ', remember that it is a character value oh be sure to use single quotes. x+1; 1 is a numeric valu
")));// 打印falseSystem.out.println(new BigDecimal("0.0").hashCode() == (new BigDecimal("0.00")).hashCode());// 打印0System.out.println(new BigDecimal("0.0").compareTo(new BigDecimal("0.00")));V. Use SCALE for DivisionBigDecimalThere is no limit to the precision of the object. If the result cannot be terminated, the divide method will be thrown ArithmeticException , such as 1/3 = 0.33333 .... Therefore, it is highly recommended to use overloaded methods divide(BigDecimal d, int scale, int roundMode)
1.ecplise Commissioning1. Set breakpointsPut a breakpoint inside the program, that is, double-click on the left side of the program where you want to place the breakpoint. Shortcut keys???2. Commissioningor right-click the program and select Debug AS (Debug) Java application (Java application), you can debug the program.3. Debugging shortcut keysAfter running the Java
Summary of teaching material content learning1. Understand the basics of Java history2. Learn the installation of JDK3. Learn the basic application of JavaGit learning and code-related1. Learn about the installation of Git on Windows system and the installation of Linux system2. I learned to upload code in a code cloud3. Learned to intercept scriptsRelated issues1. When initially contacting JDK and Java cod
, such as the windowadapter class, accordingly. The adapter has implemented the appropriate interface, such as the windowadapter class implements the windowlistener interface. Therefore, you can use objects created by the Windowadapter subclass to do the monitor, overriding the required interface methods in the subclass.
Mouse Events MouseEvent
Event Source: Mouse events can occur on any componentMouse events are triggered when the mouse enters the component, exits the comp
monitoring service, you need to specify the type of event you want to receive file change notifications. The registered directory returns a Watchkey instance key.
Perform an infinite loop to monitor the events to come. When an event occurs, the instance key is signaled and placed in the watcher queue.
Get the key instance back from the watcher queue. The Key instance contains the name of the file where the change occurred.
Get the suspended events from the key instance and process t
is), and then compare the speed (read only, not output) of reading data from the file using BufferedReader with scanner, which method is fast? Intercept the test source code, the number of the study. Please analyze the reasons in detail. Tip: You can use JUNIT4 to compare run timesThis picture is cut in the school's lab, so it's not the same as other diagrams.Using BufferedReader will save the contents of the file to the memory and then read, and sca
6.1 Using code and running results to prove that you did implement the transactional functionality, and what do you need to be aware of when you encode transactions? Note: To compare the changes made to the database in both the successful and failed run scenarios. (Paste a piece of code that you think is more valuable.) 6.2 When do you think you need to use transaction processing?Reference: Experimental Task book-topic 4Reference: Transactiontest.javaOptional: 5. Extracurricular reading 5.
Job 14-Database 1. This week's study summary 1.1 summarizes the database-related content in the way you like (mind map or other).2. Using database technology your system 2.1 briefly describes how to use the database to transform your system. What table do you want to build? The design of your watch. What are the key classes used in JDBC in the 2.2 system? 2.3 Key code for database related modules. Critical lines need to be annotated. 3. Code volume St
situations where exceptions occur. It is typical to use an if statement for type and array judgments.1.2 What kind of exception requires the user to be sure to use capture processing?Checked ExceptionRequires that the user be sure to capture the processing. Use the Try-catch or throws keyword to declare an exception that might be thrown2. Handle exceptions to make your program more robust 2.1 experimental summary. And answer: How can you make your program more robust?
Experimental summ
)3.3 Count the amount of code completed this weekThe weekly code statistics need to be fused into a single table.
Week Time
Total code Amount
New Code Volume
total number of files
number of new files
2
625
625
99
99
3
1429
804
113
14
4
3354
1925
223
110
5
3751
397
241
18
6
4369
31]
80
-1
run times
BufferedReader reading data faster than scanner
BufferedReader has greater buffer memory; Scanner requires parsing of input data, which is more time consuming
4.3 character encoding 4.3.1 an existing EncodeTest.txt file that contains some Chinese, the file is encoded using UTF-8. Use FileReader and BufferedReader to read the EncodeTest.txt text into and out. Do you have garbled characters? Why does it have garbled characters? How to solve? (Key code, occurrence numbe
section of the system with the stream associated with the file? Why use these interfaces with classes?
Read with classes, classes, File FileReader BufferedReader classes, files created through file objects, and the other two classes with the read.
Write files are used to BufferedWriter , OutputStreamWriter , FileOutputStream .
2.3 Read and write file-related code. Key lines need to be annotated3. Code volume Statistics 3.1 Statistics The amount of code done this week selected:
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.