码迷,mamicode.com
首页 >  
搜索关键字:println    ( 5792个结果
go 类型转换
func main() { s := "Hello" b := []byte(s) fmt.Println(len(b), cap(b)) fmt.Println(b) } 5 8[72 101 108 108 111] //字符串转换为字节 []byte(s) []byte转换为 string 转 ...
分类:其他好文   时间:2021-06-02 17:04:01    阅读次数:0
Java中"="的用法
Java中"="等号作用是赋值,优先级很低,就是把等号右边的值赋值给左边。但你先看下面的一块代码。 基本类型使用等号 String a = "123"; String b; System.out.println((b = a) == null);//打印1 System.out.println(b) ...
分类:编程语言   时间:2021-06-02 15:42:35    阅读次数:0
something about SAM
kotlin code: fun go(r: Runnable) = r.run() //fun fGo(f: () -> Unit) = go(f) fun main() { val g: () -> Unit = { println("what")} go(g) } equivalent jav ...
分类:其他好文   时间:2021-06-02 15:03:35    阅读次数:0
JavaSe - 为什么要有无参构造? 无参构造的作用是什么? - BiHu
class Main { public static void main(String[] args) { b bb = new b(); } } class a{ // a(){ 注释我会报错 // System.out.println("a"); // } a(int a){ System.ou ...
分类:编程语言   时间:2021-06-02 13:54:11    阅读次数:0
[设计模式]3.1简单工厂模式
一、卖票案例 //测试 public class CilentTest { public static void main(String arg[]){ Customer p1=new Children(); System.out.println(p1.calculate(100.00)); Cus ...
分类:其他好文   时间:2021-05-24 14:17:47    阅读次数:0
GO语言学习基础-学生管理系统的实现
1. 编写 main.go 程序 ` package main import ( "fmt" "os" ) var smr stuMgr //声明一个全局的全局变量学生管理smr // 菜单函数 func showMenu() { fmt.Println(" Welcome to sms! ") f ...
分类:编程语言   时间:2021-05-24 13:24:34    阅读次数:0
eclipse 编辑器的快捷键
示例 1 : 批量修改 ALT+SHIFT+R 示例 2 : 快速输入主方法 \1. 敲入main \2. alt+/ 示例 3 : 快速输入System.out.println \1. 敲入syso \2. alt+/ 示例 4 : 快速输入for \1. 敲入for \2. alt+/ 示例 5 ...
分类:系统相关   时间:2021-05-24 10:01:19    阅读次数:0
命令模式
命令模式 public interface Command { void execute(); } ? public class CommandA implements Command{ public void execute() { System.out.println("a执行了"); } }  ...
分类:其他好文   时间:2021-05-24 08:31:58    阅读次数:0
关于i++和++i
i++:先引用后加 ++I:先加后引用 示例代码: public static void main(String... args) { int a = 88; int c = a++; System.out.println(a); System.out.println(c); int b = 99; ...
分类:其他好文   时间:2021-05-24 08:08:47    阅读次数:0
方法定义、调用等、数组、多维数组及小结
什么是方法 方法定义 方法调用 方法重载 方法类型也可相同,只要参数类型不同就行, 例: public static void main(String[] args) { double sum1 = add(6.0,2); System.out.println(sum1); } public sta ...
分类:编程语言   时间:2021-05-24 07:38:03    阅读次数:0
5792条   上一页 1 2 3 4 5 ... 580 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!