Java高职蓝桥杯校内选拔题
2016-12-27 12:04
127 查看
2、下面程序段的执行结果是【3】__12345____________
public
class MyClass {
int
a[] = { 1, 2, 3, 4,5 };
void out()
{ for (int j = 0; j <
a.length; j++)
System.out.print(a[j] +
"");
}
public
static void main(String[] args) {
MyClass my = new MyClass();
my.out();
}
}
源代码
public class test_two {
int a[] = { 1, 2, 3, 4, 5 };
void out()
{
for (int j = 0; j < a.length; j++)
System.out.print(a[j] + "");
}
public static void main(String[] args) {
test_two my = new test_two();
my.out();
}
}
public
class MyClass {
int
a[] = { 1, 2, 3, 4,5 };
void out()
{ for (int j = 0; j <
a.length; j++)
System.out.print(a[j] +
"");
}
public
static void main(String[] args) {
MyClass my = new MyClass();
my.out();
}
}
源代码
public class test_two {
int a[] = { 1, 2, 3, 4, 5 };
void out()
{
for (int j = 0; j < a.length; j++)
System.out.print(a[j] + "");
}
public static void main(String[] args) {
test_two my = new test_two();
my.out();
}
}
相关文章推荐
- android_mac_eclipse_提示
- Java高职蓝桥杯校内选拔题素数问题
- eclipse自动补全的设置(自动提示)
- Maven搭建SpringMVC+Mybatis项目详解
- spring各种源码和jar包下载
- 正则中的回溯定义与用法分析【JS与java实现】
- [Java并发包学习一]Executor和ExecutorService
- Java 实现文件下载
- 利用Intellij+MAVEN搭建Spring+Mybatis+MySql+SpringMVC项目详解
- SpringBatch基本概念
- Java文件下载
- java中Class对象详解
- Java线程同步:synchronized锁住的是代码还是对象
- 《Java并发编程实战》读书笔记四:活跃性和性能,死锁和显示锁
- JavaScipt 源码解析 异步
- java中设计模式-Strategy(策略模式)
- spring mvc使用@InitBinder 标签对表单数据绑定
- java list按照元素对象的指定多个字段属性进行排序
- 《Spring源码深度解析》阅读笔记5-默认标签的解析之bean标签的解析及注册
- java异常集锦(一)