包含标签:Java 的文章
-
Java Map. Clear() method: removes all mapping relationships from the map collection
clear() Example public static void main(String[] args){ Map map = new HashMap(); //定义Map集合 map.put("昨天"…… -
What is a URL? And URL class and urlconnection class
URL concept protocol://resourceName http://www.sun.com/ 协议名://主机名 http://localhost:8080/Test/admin/logi…… -
JSP include instruction: the instruction that contains the file
<%@include file="file url"%> <%@include file = "welcome.jsp?name=yxq"%> Example <%@include file = "welc…… -
JSP Request. Getuserprincipal() method: returns Java security. Principal object
getUserPrincipal() Example <% Principal p = request.getUserPrincipal(); %> -
Java List. Size () method: returns the number of elements in the list
size() Example public static void main(String[] args){ List<String>list = new ArrayList<String>(); …… -
Java DriverManager. Getlogwriter() method: get the printout stream of the log
getLogWriter() Example PrintWriter out=null; out=DriverManager.getLogWriter(); if(out!=null){ out.println("得到…… -
Java List. Addall() method: adds all elements to the list
Grammar 1 addAll(Collectionc) Example public static void main(String[] args){ List<String>list = new Arra…… -
Java Map. Putall() method: append another map object to the current map collection
putAll(Mapm) Typical application public static void main(String[] args){ Map map1 = new HashMap(); //定义Map集…… -
Java indexof() method: returns the index position of the first occurrence
Grammar 1 indexOf(int ch) Example String strCom = "I like java"; int index = strCom.indexOf(5); Grammar 2 indexOf(i…… -
JSP Out. Getbuffersize() method: get the size of the output stream buffer
getBufferSize() Example <% int size = out.getBufferSize(); out.println("JSP页面的缓冲区大小为:"+size); …… -
JSP Request. Getrequesturi () method: get the relative path of the website accessed by the client
getRequestURI() Example <% String p = request.getRequestURI(); out.println("访问的URI路径为:"+p); %> -
JSP PageContext. Getattribute () method: retrieves the attribute within the specified range
getAttribute(String name,int scope) Example <% pageContext.getAttribute("user",pageContext.SESSION_SCOPE); …… -
Jsp: include: the page contains tags
Example <%@page contentType="text/html;charset=gb2312"%>//将top.jsp文件包含进来 <jsp:include …… -
JSP PageContext. Getservletcontext () method — returns an instance of ServletContext
getServletContext() Example <% ServletContext sc = pageContext.getServletContext(); %> -
Java replaceall() method: replace all matching strings
replaceAll(String regex,String replacement) Example String str = "成功者找方法,"; //定义字符串 str = str.replaceAl…… -
Java Map. Containsvalue() method: judge whether the map collection contains the specified key value
containsValue(Object value) Example public static void main(String[] args){ Map map = new HashMap(); //定义Map…… -
Java Connection. Rollback() method: transaction rollback
Grammar 1 rollback() Example Connection conn = …… //省略部分代码 conn.setAutoCommit(false); //先将事务设为手动提…… -
JSP application. Getmimitype() method: returns the MIME type of the specified file
getMimeType(String file) Example <% out.print(application.getMimeType("photo.jpg")); %> 运行结果如下: i…… -
Jsp: getproperty: data acquisition tag
Example <jsp:useBean id="date" class="java.util.Date" scope="session"/> //获取月份的属性 <jsp:getPrope…… -
JSP Out. Clear() method: clear the data in the buffer
clear() Example <% out.println("C语言中文网"); out.clear(); %> -
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…… -
JSP from shallow to deep (11) — tag library
JSP 1.1 proposes a method of extending JSP flag, which is named "flag library". These libraries allow additional flags…… -
Feel the characteristics of Java data object JDO 2.0 query language (1)
The improvement of query language is jdo2 0 specification. This paper expounds jdo2 from a higher level Some new featu…… -
JSP from shallow to deep (8) — JSP Tags
Another important syntax of JSP is tags. JSP tags does not use <%, but only the < character. JSP tag is a bit li…… -
Note: Lecture 4 exception handling and I / O flow in Java
[thinking before class] 1. What are exceptions? What are the two exception handling mechanisms in Java? 2. What are th…… -
Note: Lecture 3 object oriented features in the Java language
[thinking before class] 1. What are objects? What are classes? What are packages? What are interfaces? What are intern…… -
Note: Lecture 6 Java threads and Java applets
[thinking before class] 1. What is a thread? What is the difference between it and a process? What is the applicable d…… -
JSP from simple to deep (3) — adding dynamic content through expressions
In our previous chapters, any HTML file can be transformed into a JSP file by changing its extension to jsp。 Of cours…… -
Here comes tiger j2se1 5 list of new features
Although the Java version has evolved from 1.0 to 1.4 2. However, the Java language itself has not changed much, only …… -
JSP from simple to deep (10) — beans and forms processing
Forms is a very common way to interact on websites. JSP makes form processing easier. The standard way to process form…… -
Note: Lesson 5 AWT graphical user interface design
[thinking before class] 1. Java language is a cross platform programming language, so how can the graphical user inter……