JSP Out. Print () method: output data to JSP page
•
Java
Grammar 1
print(boolean b)
Example
<% out.print(3>2); %>
Grammar 2
print(char c)
Example
<% char c = 'A'; out.print(c); %>
Grammar 3
print(int i)
Example
<% int num = 96; out.print(num); %>
Grammar 4
print(long l)
Example
<% int num = 96; long sum = 10; out.print(sum+num); %>
Grammar 5
print(float f)
Example
<% int num = 96; float price = 0.76f; out.print(num*price); %>
Grammar 6
print(double d)
Example
<% int num = 96; double price = 1.76f; out.print(num*price); %>
Grammar 7
print(char[] s)
Example
<% char[] s = new char[]{'J','a','v','编','程','词','典'}; out.print(s); %>
Grammar 8
print(String s)
Example
<% String s = "Java编程词典,是编程人员的宝典"; out.print(s); %>
Grammar 9
print(Object obj)
Example
<% Date date = new Date(); out.print(date); %>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码