package cep10; public class Static1 { void fun1(){ System.out.println("这是一个普通方法"); } static void fun2(){ System.out.println("这是一个静态方法"); } ...
分类:
其他好文 时间:
2015-11-15 23:17:24
阅读次数:
215
源程序代码:package text;import java.util.Scanner;class Scored{int scored;void set(){Scanner sc=new Scanner(System.in);try{System.out.println("请输入0到100间的成绩"...
分类:
其他好文 时间:
2015-11-15 23:15:17
阅读次数:
267
一:例题:package test;import javax.swing.*;class AboutException { public static void main(String[] a) { int i=1, j=0, k; try { ...
分类:
编程语言 时间:
2015-11-15 21:48:25
阅读次数:
189
《C和指针》——6.3题目: 编写一个函数,把参数字符串中的字符反向排列。函数原型: void reverse_string(char *string);要求: 使用指针而不是数组下标 不要使用任何C函数库中用于操纵字符串的函数 不要声明一个局部数组来临时存储参数字符串解答代码:#incl...
分类:
其他好文 时间:
2015-11-15 20:40:29
阅读次数:
264
public class ParentChildTest { public static void main(String[] args) { Parent parent=new Parent(); parent.printValue(); Child child=new Child(); ...
分类:
其他好文 时间:
2015-11-15 20:27:05
阅读次数:
143
一、instancetype和id关键字的区别1)instancetype表示方法的返回类型和调用方法的对象类型相同。2)在Object-C引入instancetype之前,初始化方法的返回类型都是id,id的定义是【指向任意对象的指针(相当于C语言中的void*)】它们的区别是:instancet...
分类:
移动开发 时间:
2015-11-15 20:25:48
阅读次数:
272
import java.util.Scanner;public class Score { public static void main(String[] args) { System.out.println("请输入成绩"); Scanner sc = new ...
分类:
其他好文 时间:
2015-11-15 19:00:10
阅读次数:
109
程序代码:import javax.swing.JOptionPane;public class TryCatchTest { public static void main(String args[]){String grade;grade=JOptionPane.showInputDialog(...
分类:
其他好文 时间:
2015-11-15 18:57:37
阅读次数:
168
public void mearge(Map map) { Map returnMap = new HashMap(); // 转换为Entry Set> entries = map.entrySet(); // 遍历 for (...
分类:
编程语言 时间:
2015-11-15 17:48:02
阅读次数:
183
一、nullptr的意义 1.NULL在C中的定义#define NULL (void*)0 2.NULL在C++中的定义#ifndef NULL #ifdef __cplusplus #define NULL 0 #else #define NULL ((void *)0)...
分类:
编程语言 时间:
2015-11-15 17:43:50
阅读次数:
269