码迷,mamicode.com
首页 >  
搜索关键字:println    ( 5792个结果
Java正则表达式校验QQ号码和邮箱地址格式
1 public class Demo02 { 2 public static void main(String[] args) { 3 Scanner sc = new Scanner(System.in); 4 String s = ""; 5 System.out.println("请输入一个... ...
分类:编程语言   时间:2019-06-17 18:55:42    阅读次数:129
静态方法和非静态变量
1 2 3 4 5 6 7 8 public class Test { public int x; public static void main(String []args) { System. out. println("Value is" + x); } } 对于上面这段代码,以下说法正确的是 ...
分类:其他好文   时间:2019-06-17 12:43:26    阅读次数:124
多线程(四)wait()、notify()以及notifyAll()
六、线程得等待和唤醒 1.wait()和notify()的简单示范 public class Wait extends Thread{ public synchronized void run() { System.out.println(getName()+"执行notify()"); notif ...
分类:编程语言   时间:2019-06-16 09:40:47    阅读次数:115
字符串反转
public class TurnOver { public static void main(String[] args) { String str = "abcdefg"; System.out.println("方法1:" + turnOver1(str)); System.out.print... ...
分类:其他好文   时间:2019-06-15 17:37:18    阅读次数:108
不依赖驱动更新blob字段
不依赖驱动更新blob字段/***此方法用于执行对大对象进行操作的sql语句*传入的参数:blob对象*/publicbooleanexecUpdateBlobSQL(Stringsql,StringtJSONObj){PreparedStatementpstmt=null;ResultSetrs=null;//System.out.println("下面是预编译ExecSQL...");Syst
分类:其他好文   时间:2019-06-15 09:20:07    阅读次数:70
Java中使用ServerSocket和Socket的多线程示例
开始...1、服务器端:publicclassServerSocketApp{publicstaticvoidmain(String[]args){try{ServerSocketserverSocket=newServerSocket(9999);System.out.println("服务已启动");while(true){Socketsocket=serverSocket.accept();
分类:编程语言   时间:2019-06-14 16:12:11    阅读次数:148
Java中BigDecimal的实战应用
//初始化1000.155BigDecimalbigDecimal=newBigDecimal(1000.155);//直接舍去小数点后2两位bigDecimal=bigDecimal.setScale(2,BigDecimal.ROUND_DOWN);System.out.println(bigDecimal);//1000.15//去除小数,向上进位bigDecimal=bigDecimal.
分类:编程语言   时间:2019-06-12 00:47:49    阅读次数:134
关于静态变量和静态方法的测试
package cs.cwnu; public class StaticTest { int a = 1;//非静态变量 static int b = 2;//静态变量 void sayA() {//非静态方法 this.a=2; System.out.println(a); this.b = 3; ...
分类:其他好文   时间:2019-06-09 23:51:49    阅读次数:115
Runnable优先级
package workhome; public class ThreadPriority { public static void main(String[] args) { MyThread a= new MyThread("S"); System.out.println(a.getPriori ...
分类:其他好文   时间:2019-06-08 15:06:42    阅读次数:109
go语言碎片整理之标准库log
无论是软件开发的调试阶段还是软件上线之后的运行阶段,日志一直是很重要的环节,我们也应该养成在程序中记录日志的好习惯。logGo语言内置的log包实现了简单的日志服务。本文介绍了标准库log的基本使用。使用Loggerlog包定义了Logger类型,该类型提供了一些格式化输出的方法。本包也提供了一个预定义的“标准”logger,可以通过调用函数Print系列(Print|Printf|Println
分类:编程语言   时间:2019-06-06 09:13:16    阅读次数:131
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!