码迷,mamicode.com
首页 >  
搜索关键字:void    ( 62627个结果
1、File类简介
1 package Io; 2 3 import java.io.File; 4 5 public class IoTest { 6 public static void main(String[] args) { 7 try { 8 //声明一...
分类:其他好文   时间:2015-12-02 20:29:51    阅读次数:159
各类运算符练习
package hello;public class yunsuanfu { public static void main(String[] args) { System.out.println("20 % 7="+(20%7)); int z = 10; z++;...
分类:其他好文   时间:2015-12-02 20:21:36    阅读次数:159
三位运算符,联系操作
package hello;public class gaofushuai { public static void main(String[] args){ int a=1; int b=1; int c=1; String str=a...
分类:其他好文   时间:2015-12-02 20:21:08    阅读次数:150
JAVA构造函数与方法是啥意思
成员方法必须有返回类型即使是没有返回,也要写上void构造函数没有返回类型,而且和类名一样!一个类里面,一看就知道了譬如:public class Test{public Test(){} //构造函数public Test(int i)(){} //构造函数public void test(){}...
分类:编程语言   时间:2015-12-02 20:20:44    阅读次数:161
冒泡排序既可以排字符串也可以排字符串
编写一个冒泡排序,既可以编写字符串也可以编写数字。1).需要实现一个函数指针,在排序的时候将函数的入口地址传进来。 voidsort(void*base,intlen,intwidth,int(*cmp)(constvoid*,constvoid*)) { assert(base); inti=0; intj=0; for(i=0;i<len;i++) { for(j=0;j<..
分类:编程语言   时间:2015-12-02 18:51:01    阅读次数:163
linux alarm函数解除read write等函数的阻塞
看到apue的第十章,说到alarm,pause可以实现sleep,可以让某些一直阻塞的函数超时,例如read,write。代码如下: 1 static void sig_alrm(int signo) 2 { 3 printf("I'm just print from sig_alrm...
分类:系统相关   时间:2015-12-02 18:26:55    阅读次数:177
Codeforces Round #334 (Div. 2)
水A - Uncowed Forces#include using namespace std;typedef long long ll;const int N = 1e5 + 5;const int INF = 0x3f3f3f3f;int main(void) { int s[5] = {50,...
分类:其他好文   时间:2015-12-02 18:25:59    阅读次数:227
希尔排序
#include#includevoid shellSort(int r[],int len);int main(void){ int r[] = {45,20,80,40,26,58,66,70}; shellSort(r,8); system("PAUSE");}void shellSor...
分类:编程语言   时间:2015-12-02 18:12:07    阅读次数:136
归并排序
#include #include void merge(int r[],int first,int last,int mid){ int number_temp[10]={0}; int i=first,j=mid+1,k; for(k=0;k<=last-first;k++) { if...
分类:编程语言   时间:2015-12-02 17:48:17    阅读次数:137
LeetCode() Min Stack 不知道哪里不对,留待。
class MinStack {public: MinStack() { coll.resize(2); } void push(int x) { if(index == coll.size()-1) coll.resize(...
分类:其他好文   时间:2015-12-02 16:21:27    阅读次数:145
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!