码迷,mamicode.com
首页 >  
搜索关键字:int    ( 143001个结果
java11-5 String类的转换功能
String的转换功能: byte[] getBytes():把字符串转换为字节数组。 char[] toCharArray():把字符串转换为字符数组。 static String valueOf(char[] chs):把字符数组转成字符串。 static String valueOf(int ...
分类:编程语言   时间:2016-09-16 00:10:01    阅读次数:232
面向对象基础5
编写Java应用程序。首先,定义描述学生的类——Student,包括学号(int)、 姓名(String)、年龄(int)等属性;二个方法:Student(int stuNo,String name,int age) 用于对对象的初始化,outPut()用于输出学生信息。其次,再定义一个主类—— T ...
分类:其他好文   时间:2016-09-15 21:38:03    阅读次数:201
c语言之函数参数传递之数组篇(转)
在VC中写程序都习惯了,一般数组作为函数实参时,最常用的方法就是引用和指针的方法,但是到C语言中就没有引用了,还有一种比较常用的方法: #include <stdio.h>void sort(int array[],int n){int i,j,k,t;for(i=0;i<n-1;i++){k=i; ...
分类:编程语言   时间:2016-09-15 19:18:21    阅读次数:185
java数据类型转换
ava数据类型的转换一般分三种,分别是:(1). 简单数据类型之间的转换 在Java中整型、实型、字符型被视为简单数据类型,这些类型由低级到高级分别为(byte,short,char)--int--long--float--double 简单数据类型之间的转换又可以分为: ●低级到高级的自动类型转换 ...
分类:编程语言   时间:2016-09-15 19:11:47    阅读次数:328
fork
1 #include <unistd.h> 2 #include <stdlib.h> 3 #include <stdio.h> 4 #include <fcntl.h> 5 #include <error.h> 6 #include <errno.h> 7 int glob = 6; 8 char ...
分类:其他好文   时间:2016-09-15 19:06:01    阅读次数:114
【BZOJ1179】Atm
tarjan缩点 之后跑一边spfa即可 1 #include<cstdio> 2 #include<cstring> 3 using namespace std; 4 const int N=500010,novis=-1,over=1,nowvis=0; 5 int head1[N],head2 ...
分类:其他好文   时间:2016-09-15 18:00:36    阅读次数:231
dynamic_cast 与 typeid
C++中的类型转换分为两种: 隐式类型转换一般都是不经意间就发生了,比如int + float 时,int就被隐式的转换为float类型了。 显示类型转换包括四种方式:dynamic_cast、static_cast、const_cast、reinterpret_cast static_cast s ...
分类:其他好文   时间:2016-09-15 17:56:18    阅读次数:104
九度oj 题目1085:求root(N, k) 清华2010年机试题目
N<k时,root(N,k) = N,否则,root(N,k) = root(N',k)。N'为N的k进制表示的各位数字之和。输入x,y,k,输出root(x^y,k)的值 (这里^为乘方,不是异或),2=<k<=16,0<x,y<2000000000,有一半的测试点里 x^y 会溢出int的范围( ...
分类:其他好文   时间:2016-09-15 17:48:42    阅读次数:195
重复执行一个语句
1 public class Forxunhuan { 2 public static void main(String[] args){ 3 for(int i = 0;i<8;++i){ 4 System.out.println(i); 5 } 6 /*int i = 0 为变量的初始化,计数器 ...
分类:其他好文   时间:2016-09-15 16:38:52    阅读次数:156
n的二进制中1的个数
题目描述 输入一个整数,输出该数二进制表示中1的个数。其中负数用补码表示。 public class Solution { public int NumberOf1(int n) { int count = 0; while(n!= 0){ count++; n = n & (n - 1); } r ...
分类:其他好文   时间:2016-09-15 16:34:48    阅读次数:198
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!