![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
nonocd
这个作者很懒,什么都没留下…
展开
-
Java笔记—格式化输出
PrintStream提供的两个format函数:1.public PrintStream format(String format, Object ... args)2.public PrintStream format(Locale l, String format, Object ... args) 简单的实例import java.util.Calendar;imp原创 2013-02-28 18:18:36 · 308 阅读 · 0 评论 -
Java笔记—Math类
提供的常量:Math.PI,Math.EMath类提供的一些常用的方法public class BasicMathDemo{ public static void main(String[] args) { double a = -191.635; double b = 43.74; int c = 16, d = 45; System.out.prin原创 2013-02-28 18:35:02 · 432 阅读 · 0 评论 -
Java笔记—String,StringBuffer ,StringBuilder 的区别
StringBuffer: A thread-safe, mutable sequence of characters. A string buffer is like a String, but can be modified. At any point in time it contains some particular sequence of characters, but原创 2013-03-01 10:51:30 · 341 阅读 · 0 评论 -
Javac命令-指定用户类路径
使用 javac [ options ] [ sourcefiles ] [ @files ] 来编译 .java 文件。我一般的习惯是,src目录存放Java源代码,classes目录存放编译产生的.class文件,lib目录存放引用的第三方类库文件。一般格式就为:javac -d classes src/*.java -classpath bin/httpcore-4.2.2.jar:原创 2013-03-18 22:30:19 · 2207 阅读 · 0 评论 -
Ubuntu上Java及其开发环境的搭建
摘自网上,只为了方便下Ubuntu Java环境搭建1.到JDK官方网站下载相关的JDK2.在个人文件夹目录下建立一个“Java “文件夹3.打开“终端”,并解压缩JDK4. 设置JAVA_HOME环境系统变量a) /etc/environment文件修改在上文所打开的终端中输入:sudo gedit /etc/environment在所弹出的gedit文转载 2013-04-14 23:47:56 · 545 阅读 · 0 评论 -
对List分页显示
由于数据是从多个地方查出,再重新过滤封装组成的List集,在JSP页面需要分页显示。其实想法很简单就是简单的通过对List数据分段获取。private int totalPut;// 总记录数private int totalPage = 1;// 总页数private int currentPage = 1;//当前页码private int pageSize = 5;//页面大原创 2013-04-27 11:35:12 · 741 阅读 · 0 评论 -
Java笔记—初始化
Three ways to initialize a data field:By setting a value in a constructorBy assigning a value in the declarationInitialization blocksWhat happens in detail when a constructor is called:All d原创 2013-03-21 20:41:59 · 444 阅读 · 0 评论 -
JLS中给出的Java类对象初始化顺序
引用自 section 12.5 of the Java Language Spec:http://docs.oracle.com/javase/specs/jls/se7/html/jls-12.html#jls-12.5Just before a reference to the newly created object is returned as the result, t转载 2013-08-27 22:20:58 · 662 阅读 · 0 评论