码迷,mamicode.com
首页 >  
搜索关键字:out    ( 35870个结果
装饰设计模式的简单理解
//装饰设计模式。//不修改原对象,对原有对象的功能进行增强。classPerson{voidchifan(){System.out.println("吃饭");}}classNewPerson{privatePersonp;NewPerson(Personp){this.p=p;}publicvoidnewChifan(){System.out.println("开胃酒");p.chifan();System.out.println("甜点..
分类:其他好文   时间:2016-07-10 06:32:27    阅读次数:186
Java -- 子类使用super调用父类的方法A,A 调用了方法B,子类也override方法B,那么super.A()最终调用到了子类的B方法
public class SuperClass{ public void printA(){ System.out.print("SuperClass-printA"); printB(); } public void printB(){ System.out.print("SuperClass-p ...
分类:编程语言   时间:2016-07-10 00:57:43    阅读次数:190
idea快捷键
今天偶然发现了IntelliJ中 创建main函数的快捷键,依次还有for循环,System.out.println(); 在编写代码的时候直接输入psv就会看到一个psvm的提示,此时点击tab键一个main方法就写好了。 psvm 也就是public static void main的首字母。 ...
分类:其他好文   时间:2016-07-09 22:09:35    阅读次数:154
swift2.2当中的inout参数的使用
在Swift中,初次接触inout关键字以及它的用法,可能会让我们想起C/C++中的指针,但实际上Swift中inout只不过是按值传递,然后再写回原变量,而不是按引用传递: An in-out parameter has a value that is passed in to the funct ...
分类:编程语言   时间:2016-07-09 18:00:24    阅读次数:423
219. Contains Duplicate II
问题: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and ...
分类:其他好文   时间:2016-07-09 14:53:16    阅读次数:133
7-9交换手牌
import java.util.Scanner; public class D1 { public static void main(String[] args) { Scanner input=new Scanner (System.in); System.out.println("输出互换前手 ...
分类:其他好文   时间:2016-07-09 14:43:39    阅读次数:172
Intellj IDEA Java随笔
敲击sout+Tab会出现:System.out.println(); int(-2147483648, 2147483647) 当一个方法类型不是void时,那么我们不仅要考虑它正确时的返回值,错误时的返回值我们也要定义一下,如:return -1; 所以,当一个方法(method)返回-1,那么 ...
分类:编程语言   时间:2016-07-09 13:29:02    阅读次数:291
linux gcc编译多个文件的方法
假设源程序文件名为test.c。 1. 无选项编译链接 用法:#gcc test.c 作用:将test.c预处理、汇编、编译并链接形成可执行文件。这里未指定输出文件,默认输出为a.out。 2. 选项 -o 用法:#gcc test.c -o test 作用:将test.c预处理、汇编、编译并链接形 ...
分类:系统相关   时间:2016-07-09 12:02:49    阅读次数:192
JSTL 核心标签库 使用
JSTL 核心标签库标签共有13个,功能上分为4类: 1.表达式控制标签:out、set、remove、catch 2.流程控制标签:if、choose、when、otherwise 3.循环标签:forEach、forTokens 4.URL操作标签:import、url、redirect ...
分类:Web程序   时间:2016-07-09 11:57:06    阅读次数:213
c# out ref 多个返回值问题个人总结
多个返回值可以用ref或者out来实现 如 var b=string.Empty(); var c=string.Empty(); public bool Test(string a, out string b,ref string c) { return true; } 这样可以返回三个值:tru ...
分类:Windows程序   时间:2016-07-08 21:47:39    阅读次数:240
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!