Java Study Notes 45 (multithreading 2: security issues and solutions), java Study Notes
Thread security issues and solutions:
Security issues occur when multiple threads use one shared data.
A classic case:
Tickets are sold in cinemas, with a total of 100 seats and a maximum of 100 tickets. There are many ways to buy
Java Study Notes 12, java Study Notes
The Object class is the parent class of all classes, arrays, and enumeration classes. It is the root class of the class hierarchy. Each class uses an Object as a superclass. All objects (including
Array.
The Object class implements the following methods:
Let's take a look at the
Control Execution Process -- (Java study note 3), java Study NotesThe most basic form of if-else control program flow
Format:If (boolean-expresion ){Statement}OrIf (boolean-expresion ){Statement} Else {Statement}Example:
public static int testIf(int testVal,int target){ int result = 0; if(testVal > target){ result+
Java Study Notes-internationalization (41), java Study Notes
Internationalization: internationalization is I18N.
Example:
Websites of undergraduate colleges and universities generally have two webpage styles: Chinese and English. Therefore, this method of displaying different page styles based on different user groups
Java Study Notes 4 (method) and java Study Notes 4
Methods are similar to functions in c ++. The difference is that java's method definition is not limited. The definition in c ++ must be declared before the function call after the main function:
Example of the rectangular area method:
Public class MethodDemo {public s
Java study note 12 (Object-Oriented 5: constructor, this re-exploration), java study note
During development, you often need to specify the property values of object pairs when creating objects,
For example, a Person object should have attributes such as age and name when being created.
So how can we initialize the pro
JAVA Study Notes (46)-internal class details, java Study NotesMember internal class
/** Internal Class * is defined as a Class in another Class. It is called an internal Class. The Inner Class * contains internal classes and is called an external Class Outer Class ** Application Scenario: event processing in the form p
Java Study Notes-sessions (24) and java Study Notes
1. Use cookies to display the user's last access time
Public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {// page output response. setCharacterEncoding ("UTF-8"); response. setContentType ("text/html; char
Java Study Notes-JSP 1 (32), java Study Notes
Servlet as a dynamic web page development technology is too unreliable. In particular, when writing a page, you need to specify the template tag of the page and process a lot of business logic. Therefore, it is complicated.
Think: Why is it so hard for Servlet to write a pa
Java Study Notes 11 (Object-Oriented 4: Polymorphism) and java Study Notes
Polymorphism:
Example: Describes multiple forms of a thing. For example, the Student class inherits the Person class. A Student object is both Student and Person.
Polymorphism is: the parent class reference variable can point to the subclass obj
Java Study Notes 30, java Study Notes
The sortedlist class is the implementation class of the List interface. It is a List set and allows random access to the collection elements based on the index. In addition, the consumer list is also real
The Deque interface can be used as a dual-end queue or a "stack. A chain-bas
Java study notes 28, java Study Notes
Vector is the implementation class of the List interface and supports all functions of the List interface. The Vector class is a List class implemented based on arrays and encapsulates a dynamic,
The Object [] array that allows redistribution. The Vector is thread-safe and require
Java Study Notes 27, java Study Notes
Vector is the implementation class of the List interface and supports all functions of the List interface. The Vector class is a List class implemented based on arrays and encapsulates a dynamic,
The Object [] array that allows redistribution. The Vector is thread-safe and require
Java Study Notes 17 (Object-Oriented 10: Comprehensive cases) and java Study Notes
At the end of the object-oriented topic
Combined with the previous articles, I used many Object-Oriented Knowledge and made a simple case:
Hotel case:
Package hotel;/** hotel staff class * Common Features of employees: name, Employee i
Java Study Notes 3 (array), java Study Notes 3 Array
1. array definition:
First:
Public class ArrayDemo {Public static void main (String [] args ){// Define an arrayInt [] arr = new int [3];// The default value of the element in the array is 0.System. out. println (arr [0]);System. out. println (arr. length );}}
Here
12
13
8899
1498
141
18
4: Optional 4.1: Character stream with text file: Using PrintWriter (Write), BufferedReader (read) 1: Generated three student objects, Use PrintWriter's println method to write to Student.txt, one student per line, and each student's attribute separated by |. Use scanner or BufferedReader to read the Student.txt data. (Key code, occurrence number)Operation Result:2: How much is the generated file size (using the right-click
1: Summary of this week's study2: Using a database to retrofit your system 2.1: A brief description of how to use the database to transform your system. What table do you want to build? The design of your watch.Create a table for a libraryCreate a library information table for readers---assume that a person can borrow up to 3 books.2.2.: What are the key classes in JDBC used in the system? 2.3: Key code for database-related modules. Critical lines need to be annotated. 3: Code Volume statisticsS
content to seeTry using the Get/index http/1.0 command:4 Start the Connectionwatcher, and then start a number of Internet-enabled programs (such as QQ, Telnet, browser, etc.), to see what the computer on the Internet, what port is used? What ports does QQ use to interact with those remote IPs, where are these IPs distributed? What protocols are used for communication?QQ uses 80 port, ip:183.232.103.219, Shenzhen city, Guangdong province360 browser is using 80 port, ip:180.163.251.158, Shanghai,
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.