码迷,mamicode.com
首页 >  
搜索关键字:println    ( 5792个结果
Go语言 碎片整理之 文件操作
文件是什么?计算机中的文件是存储在外部介质(通常是磁盘)上的数据集合,文件分为文本文件和二进制文件。打开和关闭文件os.Open()函数能够打开一个文件,返回一个*File和一个error。对得到的文件实例调用close()方法能够关闭文件。funcmain(){file,err:=os.Open("./main.go")iferr!=nil{fmt.Println("openfilefailed
分类:编程语言   时间:2019-06-04 09:30:05    阅读次数:140
遍历Map的几种方式
Java代码 Java代码 Java代码 第一种用for循环 Java代码 for(Map.Entry<String, String> entry:map.entrySet()){ System.out.println(entry.getKey()+" >"+entry.getValue()); } ...
分类:其他好文   时间:2019-06-03 20:21:42    阅读次数:111
吴裕雄--天生自然 JAVA开发学习:重写(Override)与重载(Overload)
class Animal{ public void move(){ System.out.println("动物可以移动"); } } class Dog extends Animal{ public void move(){ System.out.println("狗可以跑和走"); } } pu... ...
分类:编程语言   时间:2019-06-03 12:42:17    阅读次数:113
忍的一天
package pkg30;public class Test15{public static void main(String[] args){ for(int i=1;i<10;i++){ for(int j=1;j<=i;j++){ System.out.println(i+"*"+j+"=" ...
分类:其他好文   时间:2019-06-02 20:35:45    阅读次数:139
吴裕雄--天生自然 JAVA开发学习:基本数据类型
public class PrimitiveTypeTest { public static void main(String[] args) { // byte System.out.println("基本类型:byte 二进制位数:" + Byte.SIZE); System.out.print... ...
分类:编程语言   时间:2019-06-01 16:34:47    阅读次数:106
Hello World
public class Main{ public static void main(String[] args){ System.out.println("Hello World"); } } ...
分类:其他好文   时间:2019-05-29 13:02:21    阅读次数:74
int类型与Integer对象转换,其他基本类型转换方式相同。
int对应的是Integer,char对应的Character,其他6个都是基本类型首字母大写。 parseXXX(String s);其中XXX表示基本类型,参数为可以转成基本类型的字符串。 System.out.println(Integer.parseInt("123") + 2); //打印 ...
分类:其他好文   时间:2019-05-27 11:54:50    阅读次数:114
Java 实现阶乘 BigInteger
import java.math.BigInteger; public class getFactorial { public static void main(String[] args) { // 15511210043330985984000000 System.out.println(get... ...
分类:编程语言   时间:2019-05-26 13:14:17    阅读次数:113
方法和数组就是这么简单!
第三章 方法和数组 3.1 概述 还记得我们的HelloWorld例程吗?我们现在对于输出语句应该已经很熟悉了,解释: System 是系统类。 out 是标准输出对象 println() 是一个方法。 如果我们想要在一个类中实现很多功能,但是如果我们想要,多次使用,某一个功能,显然我们需要重复书写 ...
分类:编程语言   时间:2019-05-26 11:11:09    阅读次数:135
如何把对象手动注入Spring容器并实现依赖注入
将对象注入到Spring容器并实现依赖注入 public class UserDao { @Resource AccountService accountService; public void print(){ System.out.println(accountService); } } 比如有 ...
分类:编程语言   时间:2019-05-25 12:36:48    阅读次数:397
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!