1, in fact, I found that with the skill of PHP in the inside, learning Java up or not very laborious, but Java has no process-oriented Packagesecond;Importjava.sql.*;//Import Public classMySQL { Public Static voidMain (string[] args)throwssqlexception{String Driver= "Com.mysql.jdbc.Driver";//declaring the class to be importedString DSN = "Jdbc:mysql://127.0.0.1:3
The work is relatively easy recently, so day time can work while learning. Today I have a brief list of the most recent time I want to complete a timetable, here to share with you, but also let yourself back in the evening to learn more.
On behalf of the completion matters
Scheduled completion time
Note
Understand classes, understand inheritance, and understand interfaces.Understand the concept of arrays, coll
handling a request this belongs to the session. See maintaining Client State.
Request
Subtype ofjavax.servlet.ServletRequest
WEB components handling the request.
Page
javax.servlet.jsp.JspContext
The JSP page that creates the object.
17.3.2Controlling Concurrent Access to Shared ResourcesIn a multithreaded server, the shared resources can be accessed concurrently. In addition to scope object attributes, shared resources include in-memory
) {Scanner input=NewScanner (System.inch); System. out. println ("Please enter your score:"); intScore=Input.nextint (); if(scoreTen) {System. out. println ("go to the finals! "); System. out. println ("Please enter your gender:"); String Sex=Input.next (); if(Sex.equals ("male") ) {System. out. println ("Enter the men's team finals"); }Else{System. out. println ("Enter the women's team finals"); } }Else{System. out. println ("you are too slow!
Java Basic Concepts:Pathl:path is a property of the operating system and is the path that the system uses to search for executable files, and the personal understanding is similar to the global variables in LinuxCalsspath:java the path of the file to be loaded when the program interprets the class fileComments:Single-line comment//Multi-line Comment/*.......*/Doc
entire work flow:ApplicationContext context = new Classpathxmlapplicationcontext (path);0. New ApplicationContext container object (not initialized);1.ResourceLoader load and parse resource file ——— > Get resource object;2.BeanDefinitionReader reads the resource object and encapsulates the bean element data it reads intoBeandefinition components;3.BeanDefinitionRegister Register all beandefinition in Beanfactory(Beandefinition is the basic data struc
object-oriented in Java
Concept: Object-oriented original meaning is "All things are Objects" " object-oriented thinking characteristics:
is a thought that is more in line with our thought habits, simplifying complex things.
has transformed our character, transformed us from the executor to the leader.
Object-oriented features:
Package (encapsulation)
Inheritance (inheritance)
Polymorphic (polymorphism)
Some of the profession
What is an array: a heap of data of the same type (a set of related variables)Definition syntax:
Declare and open an array
Data type array name [] = new data type [length];
Distribution complete
Declaring an array: Data type array name [] = null;
Open array: Array name = new data type [length];
Public classTest2 { Public Static voidMain (String args[]) {intArr[] =New int[3]; arr[0] =1; arr[1] =2; arr[2] =3; for(intI=0;i3; i++) {System. out. printl
One:OOP: Object-oriented ProgrammingOOPL: Object-oriented programming languageOMT: Object Modeling TechniquesOOA: Object-oriented AnalysisOOD: Object-oriented designIDE: Integrated development Environment (eclipse contains JDT (Java Development tools (plugin set)))Two:The object has state, behavior, and identity, and the Java language cannot directly access the object, but rather by referencing (identifying
Let's talk about my experience here. Before the university and before the university three years of experience will not say, because before the University of high School is good study, the university three years is mixed over.
I went to the school can be, although not Tsinghua University such a first-class prestigious university, but at least the second stream of China's famous university. The first three years of college are accompanied by the game in the past, only to learn some basic knowledg
What is a Servlet?A servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed By means of a request-response programming model. Although Servlets can respond to any type of request, they is commonly used to extend the applications hosted by Web Serv ERs. For such applications, Java servlet technology defines http-specific servlet classes.The java
classes * when using generic classes, although two type parameters, but actually in memory only one type of parameter * to investigate its cause, Is that the concept of generics in Java is intended to cause it to work only in the code compilation phase, and during compilation, when the generic results are correctly validated, the relevant information for generics is erased, * that is, the class file after the successful compilation is not a package c
new, we find the JDK document, we find a static in documentbuilderfactory, to obtain such an instance of a method, Called Newinstance (), we call this method, we get the example, similarly, documentbuilder, that is, we say the XML parser is also an abstract class, not new, find the document, and then use this instance of Newdocumentbuilder (), You can get a parser for the XML file.Today's study is here, tomorrow is to use the parser and parsing the development package, read the contents of the
It may be that the basics of some of the objects that have been previously available------the overall feeling that this lesson is not difficult.
Although the things that I have learned are the things that I used to touch, I still feel that I have learned a lot of good things, especially the ability to look up documents in an important way, and I am aware of that. Because Java is the reason for open source software, all have a lot of open source tools,
. Subsequent operations can be omitted if there will be execution after each loop body execution before the next loop is started. Judging the condition returns TRUE, the program executes the loop body. Loop nesting: The memory loop is treated as a statement of the outer loop. Key words to control the loop: Break (to completely end a loop itself), continue (stop the execution of the current loop body from jumping to the next loop body), return (end the entire method). Break, continue can be follo
() {intAge= -; returnAge ; } } Public classTest { Public Static voidMain (string[] args) {Lion lion=NewLion (); /*Lion.run (); String ball = Lion.robball (); C System.out.println ("Lion is playing:" + ball); System.out.println ("Come back after the method has been executed!") "); */System. out. println (Lion.getage ()); } }Local variables and member variable
Two ways of defining:
Dynamic initialization:
Define and open an array: Class name object array name [] = new class name [length]
Distribution by: Class name Object array name [] = NULL; object array name = new class name [length];
2. Static initialization:Class name Object array name [] = new class name [] {object, Object ...};classBook {PrivateString name; Private DoublePrice ; PublicBook (String N,intp) {Name=N; Price=p; } Public voidSetName (String N) {
) removes all elements from C1 in this
Boolean Containsall (Collection C1) Determines whether this contains all elements in the C1
Boolean Retainall (Collection C1) set
Traversing a collection, we use iteratorsIterators are used to iterate through each element of a collection.Method: Hasnext () and Next () PackageLesson3;//This is a small exampleImportjava.util.ArrayList;Importjava.util.Collection;ImportJava.util.Iterator; Public classNULL03 { Public Static voidMain (string[] args)
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.