1. Database
Table A and Table B have exactly the same structure, and the primary key is IndexID. Write an SQL statement to insert data that is not present in table B and that exists in table A into table B.
2. JavaScript section
The page has a Type=text object with a name of UnitPrice. The required input data cannot be empty, write a function to implement the function, if empty when prompted.
3. JSP part
①session stores a string variable named Studentname, and writes out how to get the value of the session variable in the JSP.
② is referenced in JSP to refer to JavaBean.
What are the values of ⅰscope, and what are the differences between these values?
Ⅱ when referencing JavaBean in different JSP pages, can the ID be the same, and if so, what are the requirements for scope values?
4. Java section
① input a dimension, output the matrix and series of the following form, take the dimension n=4 as an example:
0000
0111
0122
0123
② write the results of the following program
int A=2,b=3,c=1
A+=–b+c;
c-=b+a++;
System.out.println ("a=" +a+ ", b=" +b+ ", c=" +c ");
5. There is a vector object, where each element is a string object, use the For loop or while loop to output the elements in the vector, requiring the format: "The first element is: AAA"
6, there is a hashmap where key is a string object, value is an integer object, write a method to print out all the key-value pairs in this map, such as Key–value
7, there is a string str= "001,a001;002,a002;003,a003″ string, write a method, put this string into a hashmap or Hashtable, note: If 001 is key,a001 is value.
8. Object-oriented concept:
① object-oriented basic features
② What is the difference between polymorphism and overloading?
③ describe in your own words what are the essential features of the Java EE that you understand?
First: Write a method that implements the operation of deleting a node in a linked list (other conditions are assumed, supplemented)
public void Delete ()
{
if (front>=rear)
{
S[front] = 0;
front–;
System.out.println ("\ndelete successful");
}
Else
{
SYSTEM.OUT.PRINTLN ("The link is empty, can ' t delete");
}
}
Second question: Write a method that implements the stack operation (other conditions own assumptions, supplements)
public class stack{
Private int[] s;
int top,bottom;
public stack (int size) {
s = new Int[size];
top = size-1;
bottom = size-1;
System.out.println ("Size of the Stack is:" +size);
}
public boolean isEmpty ()
{
if (top==s.length-1)
return true;
Else
return false;
}
public void push (int n)
{
if (top<0)
{
System.out.println ("The stack is full now,you can ' t push your data!");
Return
}
Else
{
S[top] = n;
top–;
return;
}
}
public void Pop ()
{
if (top>=s.length-1)
{
System.out.println ("The stack is Empty,can ' t pops now!");
Return
}
Else
{
top++;
}
}
public void print ()
{
SYSTEM.OUT.PRINTLN ("State of the Stack:");
for (int i=s.length-1;i>top;i–)
{
System.out.print (s[i]+ "");
}
}
public static void Main (string[] a)
{
Stack st = new stack (5);
System.out.println ("List of the action to the stack:");
System.out.println ("Push (3):");
St.push (3);
St.print ();
System.out.println ("");
System.out.println ("Push (6)");
St.push (6);
St.print ();
System.out.println ("");
System.out.println ("Push (10)");
St.push (10);
St.print ();
System.out.println ("");
System.out.println ("Pop ()");
St.pop ();
St.print ();
System.out.println ("");
}
}
The third problem: using arbitrary sorting algorithm, write a sort of sample program
Import java.io.*;
Class selectionsort{
public static void Main (string[] args) {
Int[] a={4,54,8,7,6,98,42,};
Sort (a);
for (int i=0;i<a.length;i++) {
System.out.print (a[i]+ "");
}
System.out.println ("");
}
static void sort (int[] data) {
int Next, Indexofnext=0,n;
for (next=0;next<data.length-1;next++)
{
Indexofnext=min (Data,next, (data.length)-1);
Swap (Data,indexofnext,next);
}
}
static int min (int[] data,int Start,int end) {
int Indexofmin=start;
for (int i=start+1;i<=end;i++)
if (Data[i]<data[indexofmin])
Indexofmin=i;
return indexofmin;
}
static void Swap (int[] Data,int first,int second) {
int temp;
Temp=data[first];
Data[first]=data[second];
Data[second]=temp;
}
}
Question Fourth:
Write a servlet that sends the servlet source and the servlet's configuration file, Web. XML, on the server as an attachment to the specified mailbox
The functionality of the servlet requires logging the IP and access time of the client accessing the servlet and writing the record to the Client_ip.log file. The format in Client_ip.log is as follows:
9:36 2005-4-8 192.168.0.1
9:36 2005-4-8 127.0.0.1
Get the customer's IP address
Question Fifth
There are two tables in the database TableA and TableB, they all have a field ID of type int, please write out an SQL statement that implements the query ID in TableA, and the records that are not in TableB
For example, the following record is in TableA
—————————-
Tablea.id Tablea.name
3 Mary
4 Jack
5 Lily
—————————-
Tableb.id
3
5
The result of the query should be
—————————-
Tablea.id Tablea.name
4 Jack
SELECT *
From TableA
Where NOT EXISTS
(SELECT *
From TableB
where tablea.id=tableb.id)
The sixth topic briefly describes the relationship between JSP and servlet
Java servlet is the foundation of JSP Technology, and the development of large Web applications requires Java servlet and JSP mates to complete. Many Web servers now support Servlets, even if they do not directly support Servlet Web servers, but can also support servlets through the application servers and modules of the attachment, thanks to the cross-platform nature of Java. In addition, because the servlet internally provides services in a threaded manner, it is not necessary to start a process for each request, and the multithreading mechanism can serve multiple requests at the same time, so the servlet is highly efficient.
Question Seventh what is SQL injection vulnerability and what method is used to block SQL injection Vulnerability
With the development of B/s pattern application development, more and more programmers use this model to write applications. However, due to the lack of entry threshold in this industry, the level and experience of programmers is also uneven, a large part of the programmer in writing code, the user does not judge the legality of input data, so that the application has a security risk. The user can submit a database query code, according to the results returned by the program, to obtain some of the data he wants to know, this is called SQL injection, that is, SQL injection
Question eighth: A brief description of your knowledge of XML, examples of what XML can do and how it should be done
XML is an abbreviation for the Extensible Markup language, meaning that extensible superscript language is not in the superscript electronic document, so that the data has a structured banner. In my present plain understanding:,
XML is used to pass data,
XML gives the data a structure-a tree structure,
XML has a full set of methods for manipulating this structure
The XML specification (or the actual point, XML parser) helps you to make sure that the string you create is legal
The XML specification (or the actual point, XML parser) has a way to verify this legitimacy
For what XML can do, I think XML can be used in several ways
1: Facilitates the development of flexible Web application software
The use of XML to describe data, you can make the data have a consent to the organization structure, other applications, objects, the middle tier and the server can be used to describe the use of XML data to do further processing. And can be submitted to the browser to let the reader read
2: Easy to implement data published on the Web
Because the XML itself is in plain text format, it can be transmitted in the same way as an HTML document without any modification.
3: Facilitating the integration of information
Because XML is used, structured data from different sources can be easily organized together. The application software can integrate the data from the backend database and others on the middle-tier server. Finally, the data is sent to the client in XML format or to other servers for further processing.
4: You can use rich styles to display data
XML organizes data in a structured way, describing the data itself, without involving the representation of the data. In general, the use of CSS and XSL as well as XSLT provides a mechanism for the distribution of the data, which means that the way data is displayed can be tailored to the customer's requirements.
5: Can greatly enhance the scalability of the server
XML separates the data itself from the display of the data, so that it can be described in the form of nested data in structured data. In this way, you can reduce the data exchange between the client and server as much as possible and reduce the workload of the server to greatly improve the performance of the server.
6: Use a unified XML document format to describe data for multiple applications
7: Support Local data processing
Because the data format in the XML document is uniform, when the customer receives the data, it can use the customer's own application software to parse the data and further edit and process the data.
8: Can make search easier and more productive
By using a unified XML identity to organize data from different databases, the data can be retrieved without knowing the organization of the database data.
9: Can achieve independent update of data
10: Open standards
Although XML was originally intended to enable data files with different structures to be transmitted over the Internet in a uniform XML format,
Question Nineth
Describe a project you have made, including what functionality was implemented, and how it was implemented (algorithmic, logical structure ...), how to ensure its safety and robustness, etc.
(If you don't have project experience, suppose you want to do an OA system and describe how you're going to implement it)
Choose to do
Question Tenth:
How do I see what services the Linux system is currently running?
Question 11th:
How many files does the user account of the Linux system keep in?
Question 12th
Describe what MVC is
MVC is the abbreviation for Model-view-controller, which is the model-view-controller
MVC is used to handle issues such as validation, process Control, and updating the state of an application.
Model (models)
The model contains the core functionality of the application. The model encapsulates the state of the application. Sometimes the only function it contains is the state. It knows nothing about the view or controller.
View (views)
The view provides a representation of the model. It is the appearance of the application. The view can access the Read method of the model, but cannot access the Write method. In addition, it knows nothing about the controller. When you change the model, the view should be notified.
Controller (Controllers)
The controller responds to the user's input. It creates and sets up the model.
1. Database
Table A and Table B have exactly the same structure, and the primary key is IndexID. Write an SQL statement to insert data that is not present in table B and that exists in table A into table B.
2. JavaScript section
The page has a Type=text object with a name of UnitPrice. The required input data cannot be empty, write a function to implement the function, if empty when prompted.
3. JSP part
①session stores a string variable named Studentname, and writes out how to get the value of the session variable in the JSP.
② is referenced in JSP to refer to JavaBean.
What are the values of ⅰscope, and what are the differences between these values?
Ⅱ when referencing JavaBean in different JSP pages, can the ID be the same, and if so, what are the requirements for scope values?
4. Java section
① input a dimension, output the matrix and series of the following form, take the dimension n=4 as an example:
0000
0111
0122
0123
② write the results of the following program
int A=2,b=3,c=1
A+=–b+c;
c-=b+a++;
System.out.println ("a=" +a+ ", b=" +b+ ", c=" +c ");
5. There is a vector object, where each element is a string object, use the For loop or while loop to output the elements in the vector, requiring the format: "The first element is: AAA"
6, there is a hashmap where key is a string object, value is an integer object, write a method to print out all the key-value pairs in this map, such as Key–value
7, there is a string str= "001,a001;002,a002;003,a003″ string, write a method, put this string into a hashmap or Hashtable, note: If 001 is key,a001 is value.
8. Object-oriented concept:
① object-oriented basic features
② What is the difference between polymorphism and overloading?
③ describe in your own words what are the essential features of the Java EE that you understand?
First: Write a method that implements the operation of deleting a node in a linked list (other conditions are assumed, supplemented)
public void Delete ()
{
if (front>=rear)
{
S[front] = 0;
front–;
System.out.println ("\ndelete successful");
}
Else
{
SYSTEM.OUT.PRINTLN ("The link is empty, can ' t delete");
}
}
Second question: Write a method that implements the stack operation (other conditions own assumptions, supplements)
public class stack{
Private int[] s;
int top,bottom;
public stack (int size) {
s = new Int[size];
top = size-1;
bottom = size-1;
System.out.println ("Size of the Stack is:" +size);
}
public boolean isEmpty ()
{
if (top==s.length-1)
return true;
Else
return false;
}
public void push (int n)
{
if (top<0)
{
System.out.println ("The stack is full now,you can ' t push your data!");
Return
}
Else
{
S[top] = n;
top–;
return;
}
}
public void Pop ()
{
if (top>=s.length-1)
{
System.out.println ("The stack is Empty,can ' t pops now!");
Return
}
Else
{
top++;
}
}
public void print ()
{
SYSTEM.OUT.PRINTLN ("State of the Stack:");
for (int i=s.length-1;i>top;i–)
{
System.out.print (s[i]+ "");
}
}
public static void Main (string[] a)
{
Stack st = new stack (5);
System.out.println ("List of the action to the stack:");
System.out.println ("Push (3):");
St.push (3);
St.print ();
System.out.println ("");
System.out.println ("Push (6)");
St.push (6);
St.print ();
System.out.println ("");
System.out.println ("Push (10)");
St.push (10);
St.print ();
System.out.println ("");
System.out.println ("Pop ()");
St.pop ();
St.print ();
System.out.println ("");
}
}
The third problem: using arbitrary sorting algorithm, write a sort of sample program
Import java.io.*;
Class selectionsort{
public static void Main (string[] args) {
Int[] a={4,54,8,7,6,98,42,};
Sort (a);
for (int i=0;i<a.length;i++) {
System.out.print (a[i]+ "");
}
System.out.println ("");
}
static void sort (int[] data) {
int Next, Indexofnext=0,n;
for (next=0;next<data.length-1;next++)
{
Indexofnext=min (Data,next, (data.length)-1);
Swap (Data,indexofnext,next);
}
}
static int min (int[] data,int Start,int end) {
int Indexofmin=start;
for (int i=start+1;i<=end;i++)
if (Data[i]<data[indexofmin])
Indexofmin=i;
return indexofmin;
}
static void Swap (int[] Data,int first,int second) {
int temp;
Temp=data[first];
Data[first]=data[second];
Data[second]=temp;
}
}
Question Fourth:
Write a servlet that sends the servlet source and the servlet's configuration file, Web. XML, on the server as an attachment to the specified mailbox
The functionality of the servlet requires logging the IP and access time of the client accessing the servlet and writing the record to the Client_ip.log file. The format in Client_ip.log is as follows:
9:36 2005-4-8 192.168.0.1
9:36 2005-4-8 127.0.0.1
Get the customer's IP address
Question Fifth
There are two tables in the database TableA and TableB, they all have a field ID of type int, please write out an SQL statement that implements the query ID in TableA, and the records that are not in TableB
For example, the following record is in TableA
—————————-
Tablea.id Tablea.name
3 Mary
4 Jack
5 Lily
—————————-
Tableb.id
3
5
The result of the query should be
—————————-
Tablea.id Tablea.name
4 Jack
SELECT *
From TableA
Where NOT EXISTS
(SELECT *
From TableB
where tablea.id=tableb.id)
The sixth topic briefly describes the relationship between JSP and servlet
Java servlet is the foundation of JSP Technology, and the development of large Web applications requires Java servlet and JSP mates to complete. Many Web servers now support Servlets, even if they do not directly support Servlet Web servers, but can also support servlets through the application servers and modules of the attachment, thanks to the cross-platform nature of Java. In addition, because the servlet internally provides services in a threaded manner, it is not necessary to start a process for each request, and the multithreading mechanism can serve multiple requests at the same time, so the servlet is highly efficient.
Question Seventh what is SQL injection vulnerability and what method is used to block SQL injection Vulnerability
With the development of B/s pattern application development, more and more programmers use this model to write applications. However, due to the lack of entry threshold in this industry, the level and experience of programmers is also uneven, a large part of the programmer in writing code, the user does not judge the legality of input data, so that the application has a security risk. The user can submit a database query code, according to the results returned by the program, to obtain some of the data he wants to know, this is called SQL injection, that is, SQL injection
Question eighth: A brief description of your knowledge of XML, examples of what XML can do and how it should be done
XML is an abbreviation for the Extensible Markup language, meaning that extensible superscript language is not in the superscript electronic document, so that the data has a structured banner. In my present plain understanding:,
XML is used to pass data,
XML gives the data a structure-a tree structure,
XML has a full set of methods for manipulating this structure
The XML specification (or the actual point, XML parser) helps you to make sure that the string you create is legal
The XML specification (or the actual point, XML parser) has a way to verify this legitimacy
For what XML can do, I think XML can be used in several ways
1: Facilitates the development of flexible Web application software
The use of XML to describe data, you can make the data have a consent to the organization structure, other applications, objects, the middle tier and the server can be used to describe the use of XML data to do further processing. And can be submitted to the browser to let the reader read
2: Easy to implement data published on the Web
Because the XML itself is in plain text format, it can be transmitted in the same way as an HTML document without any modification.
3: Facilitating the integration of information
Because XML is used, structured data from different sources can be easily organized together. The application software can integrate the data from the backend database and others on the middle-tier server. Finally, the data is sent to the client in XML format or to other servers for further processing.
4: You can use rich styles to display data
XML organizes data in a structured way, describing the data itself, without involving the representation of the data. In general, the use of CSS and XSL as well as XSLT provides a mechanism for the distribution of the data, which means that the way data is displayed can be tailored to the customer's requirements.
5: Can greatly enhance the scalability of the server
XML separates the data itself from the display of the data, so that it can be described in the form of nested data in structured data. In this way, you can reduce the data exchange between the client and server as much as possible and reduce the workload of the server to greatly improve the performance of the server.
6: Use a unified XML document format to describe data for multiple applications
7: Support Local data processing
Because the data format in the XML document is uniform, when the customer receives the data, it can use the customer's own application software to parse the data and further edit and process the data.
8: Can make search easier and more productive
By using a unified XML identity to organize data from different databases, the data can be retrieved without knowing the organization of the database data.
9: Can achieve independent update of data
10: Open standards
Although XML was originally intended to enable data files with different structures to be transmitted over the Internet in a uniform XML format,
Question Nineth
Describe a project you have made, including what functionality was implemented, and how it was implemented (algorithmic, logical structure ...), how to ensure its safety and robustness, etc.
(If you don't have project experience, suppose you want to do an OA system and describe how you're going to implement it)
Choose to do
Question Tenth:
How do I see what services the Linux system is currently running?
Question 11th:
How many files does the user account of the Linux system keep in?
Question 12th
Describe what MVC is
MVC is the abbreviation for Model-view-controller, which is the model-view-controller
MVC is used to handle issues such as validation, process Control, and updating the state of an application.
Model (models)
The model contains the core functionality of the application. The model encapsulates the state of the application. Sometimes the only function it contains is the state. It knows nothing about the view or controller.
View (views)
The view provides a representation of the model. It is the appearance of the application. The view can access the Read method of the model, but cannot access the Write method. In addition, it knows nothing about the controller. When you change the model, the view should be notified.
Controller (Controllers)
The controller responds to the user's input. It creates and sets up the model.
Copyright notice: I feel like I'm doing a good job. I hope you can move your mouse and keyboard for me to order a praise or give me a comment, under the Grateful!_____________________________________________________ __ Welcome reprint, in the hope that you reprint at the same time, add the original address, thank you with
Java programmer face Question