摘要: import java.util.*;public class Example3_3 {public static void main (String args[]){Scanner reader=new Scanner(System.in);double a=0,b=0,c=0;System.out.print("input a:");a=reader.nextDouble();System.out.print("input b:");b=reader.nextDouble();System.out.print("input c:" 阅读全文
posted @ 2013-03-16 22:01 崔琪同学 阅读(98) 评论(0) 推荐(0) 编辑
摘要: public class Example2_1 {public static void main (String args[]){char c='a';System.out.println("zimu"+c+"in the unicode canlender consition:"+(int)c);System.out.println("zimubiao:");for(int i=(int)c;i<c+25;i++){System.out.print(""+(char)i);}}}public 阅读全文
posted @ 2013-03-16 20:52 崔琪同学 阅读(162) 评论(0) 推荐(0) 编辑
摘要: public class Tom {int leg;String head;void cry (String s){System.out.println(s);}}class Example {public static void main (String args[]){Tom cat ;cat =new Tom();cat.leg=4;cat.head="maotou";System.out.println("tui:"+cat.leg+"tiao");System.out.println("tou:"+cat 阅读全文
posted @ 2013-03-14 22:28 崔琪同学 阅读(127) 评论(0) 推荐(0) 编辑
摘要: class A {void f(){System.out.println("I am A");}}class B{}public class Hello{public static void main (String args[]){System.out.println("你好,很高兴学习 java");A a=new A();a.f();}} 阅读全文
posted @ 2013-03-13 19:54 崔琪同学 阅读(102) 评论(0) 推荐(0) 编辑
摘要: import java.util.*;class work{public static void main (String args[]){Scanner reader=new Scanner (System.in);int mul=1;while(reader.hasNextInt()){int x=reader.nextInt();mul=mul*x;}System.out.printf("%d个数的积为%f\n",mul);}} 阅读全文
posted @ 2013-03-07 22:31 崔琪同学 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 在我配置环境变量的时候,直接将地址粘贴了过来,就没有配置上。后来我仔细查阅书才发现,忘记加了个分号;于是加了个分号,就安装上了。 阅读全文
posted @ 2013-03-07 22:13 崔琪同学 阅读(84) 评论(3) 推荐(4) 编辑
摘要: c++是不完全的面向对象语言,兼容c代码,所以有指针这个类型,比java对于底层有较高的灵活性,运行起来有较高的速度。适合处理大量运算的程序,比如3D游戏等等。java是完全面向对象,程序里面只能是类和对象,不允许面向结构,面向过程。java封装的较为彻底,为客户提供了很多的类库,所以开发起来较快,但运行起来较慢。java的优势也有很多,比如它比较容易处理网络的业务,而且可移植性强,因为它需要jvm才能运行,所以可以很容易移植到任何操作系统。 阅读全文
posted @ 2013-03-04 20:26 崔琪同学 阅读(134) 评论(0) 推荐(2) 编辑