包含标签:Java 的文章
-
Java Connection. Setautocommit() method: sets the commit mode of the database connection
setAutoCommit(Boolean autoCommit) Example Connection conn = …… //省略部分代码 conn.setAutoCommit(false); -
JSP Response. Adddateheader() method: add the date header information of the corresponding name
addDateHeader(String name,long date) Example <% long date = System.currentTimeMillis(); response.addDateHea…… -
JSP Exception. Fillinstacktrace() method: populates the exception stack trace
fillInStackTrace() Example <%@page language="java" pageEncoding="GBK" errorPage="error.jsp"%> <% I…… -
Java Set. Contains() method: judge whether the set set contains the specified object
contains(Object o) Typical application public static void main(String[] args){ Set set = new HashSet(); se…… -
JSP Request. Getheader () method: get the file header defined by HTTP protocol
getHeader(String name) Example <% String ct = request.getHeader("content-type"); out.println("Content-type=…… -
Java DriverManager. Getdrivers() method: get all loaded drivers
getDrivers() Typical application public static void main(String[] args){ try{ Class.forName("com.microsoft.s…… -
Inheritance of Java classes: simple inheritance of Java and the difference between single inheritance and multi inheritance
Simple inheritance class class_name extends extend_class { //类的主体 } public class Student extends Person…… -
Java DriverManager. Getdriver () method: select an appropriate driver
getDriver(String url) Example Class.forName("com.MysqL.jdbc.Driver"); //注册MysqL驱动 String url = "jdbc:MysqL://l…… -
Java InetAddress class and its common methods
Example 1 public static void main(String[] args) { try { InetAddress ia1=InetAddress.getB…… -
Java Set. Toarray() method: create an array with all the objects in the set collection
Grammar 1 toArray() Example public static void main(String[] args){ Set set = new HashSet(); //定义Set集合对象…… -
Java Set. Add() method: adds an object to the set collection
add(E e) Example public static void main(String[] args){ Set set = new HashSet(); //定义Set集合对象 set.a…… -
JSP Response. Getlastaccessedtime() method: get the last access time of the session
getLastAccessedTime() Example <% long timeNum = session.getLastAccessedTime(); Date date = new Date(timeNum…… -
Solutions to Java non thread safety problems
package ch14; public class LoginCheck { private static String username; private static String password;…… -
JSP Request. Getcookies() method: get cookie object
getCookies() Example <% Cookie[] cookies = request.getCookies(); out.println("客户端包含"+cookies.length+"…… -
Java ResultSet. GetString () method: get the data of string type
Grammar 1 getString(int columnIndex) Example Connection conn = …… //省略部分代码 String sql = "SELECT username,pwd…… -
JSP Exception. GetMessage () method: get exception message text
getMessage() Example Typical application -
JSP config. Getinitparameternames() method: get the names of all initial parameters
getInitParameterNames() Example <% Enumeration names = config.getInitParameterNames(); while(names.hasMoreE…… -
What kind of programming language is Java?
Java is a simple, object-oriented, interpretive, robust, safe, naturally structured, portable, high-performance, multi…… -
Java replace() method: string replacement
Grammar 1 replace(char oldChar,char newChar); Example String str = "C语言中文网"; str = str.replace("C语言中文网","…… -
JSP Request. Getrequestedsessionid() method: get the session ID value of the website visited by the client
getRequestedSessionId() Example <% out.println(request.getRequestedSessionId()); %> -
JSP from shallow to deep (2) — the first JSP
First JSP In fact, JSP simply puts Java into HTML web pages. You can change the extension of existing HTML pages from …… -
The growth path of JSP programmers
1: Explain the use of mastery, proficiency, familiarity and understanding in this article to indicate your mastery of…… -
Java character set encoding
1. General This paper mainly includes the following aspects: basic coding knowledge, Java, system software, URL, tool …… -
JSP from shallow to deep (7) — JSP directives
In the previous tutorial, we have used java util. Date。 Some people will ask: why not just use import Java util.* And…… -
Note: Lecture 8 Java network programming
Think before class 1 What is TCP / IP protocol? 2. What are the two transmission protocols of TCP / IP and what ar…… -
Feel the characteristics of Java data object JDO 2.0 query language (3)
The query feature extended by manufacturers JDO manufacturers can provide jdoql with a variety of special query functi…… -
JSP from simple to deep (12) — form editing
For example, the flag library from the blazix server cannot be used in your system environment, so what about not usin…… -
Several problems easily confused by java beginners
1. String class and StringBuffer class are both classes that handle strings, but they have one biggest difference,…… -
JSP from simple to deep (6) — JSP declaration
Now the JSP you write will become a class definition. All the scriptlets you write should be placed in a method of thi…… -
Establishment of Tomcat environment
Tomcat is another excellent JSP server developed on the basis of sun's jswdk. It not only supports servlet, but also p…… -
JSP from shallow to deep (9) — JSP sessions
On a classic website, visitors can browse several web pages and perform some interactive behavior. If you are writing …… -
Note: Lecture 7 swing user interface design
[thinking before class] 1. What is swing? What are its advantages over AWT? What are the differences in use? 2. What a……