摘要: public class Sum { public static void main(String[] args) { System.out.println("5+5="+5+5); } public class Increment { public static void main(String[] args) { int a=3,b; ... 阅读全文
posted @ 2017-10-09 12:45 安静惠 阅读(312) 评论(2) 推荐(0) 编辑
摘要: 1输出一个长整型 public class Long { public static void main(String[] args) { long l=123456789123; System.out.println("长整型变量为:"+l); } } 2输出一个单精度常量 public class Float { public static void m... 阅读全文
posted @ 2017-10-08 16:22 安静惠 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 2.6 import java.uti1.Scanner; public class Work{ public static void main(String[] args){ Scanner input=new Scanner(System.in); System.out.print(“Enter a number between 0 and 100... 阅读全文
posted @ 2017-09-18 11:42 安静惠 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Public class Test{ public static void main(string[] args){ System.out.println((24/1.6)/1+40.0/60+35.0/(60*60)); } } 阅读全文
posted @ 2017-09-15 15:11 安静惠 阅读(97) 评论(1) 推荐(0) 编辑
摘要: Public class CirdeAndsquare{ public static void main(string[] args){ double r = 5.5; double c = 2*Math.PI*r; double s = r*r*Math.PI; System.out.println("圆的周长是:"+c); System.out.println("圆的面... 阅读全文
posted @ 2017-09-15 15:10 安静惠 阅读(75) 评论(0) 推荐(0) 编辑
摘要: Public class WelcomeRepetition{ public stati viod main(string[] args){ System.out.println("Welcome to Java"); System.out.println("Welcome to Java"); System.out.println("Welcome to Java"); } ... 阅读全文
posted @ 2017-09-15 15:07 安静惠 阅读(126) 评论(0) 推荐(0) 编辑