当前位置: 首页 > wzjs >正文

吴忠市住房和城乡建设局网站长沙优化网站价格

吴忠市住房和城乡建设局网站,长沙优化网站价格,网站建设任务执行书,保定seo全网营销在IDEA中,新建项目,步骤如图1.1所示。 新建一个分类包。 在包下面新建一个java类**(类名首字母大写)** 里面书写主函数,简写为psvm,输出helloworld。对于java来说,最小单元是类。调用的输出是为…

在IDEA中,新建项目,步骤如图1.1所示。

在这里插入图片描述

新建一个分类包。

在这里插入图片描述

在包下面新建一个java类**(类名首字母大写)**

在这里插入图片描述

在这里插入图片描述

里面书写主函数,简写为psvm,输出helloworld。对于java来说,最小单元是类。调用的输出是为静态static。"+"类似于C中的strcat()

package test_02;public class Test_02 {public static void main(String[] args) {// outputSystem.out.println("Hello World");}
}
D:\java\1.8verson\bin\java.exe ...
Hello World进程已结束,退出代码为 0
package test_02;public class Test_02 {public static void main(String[] args) {// output string// System.out.println("Hello World");/* output int double float* such as printf in C language */System.out.printf("%d %.2f", 10, 11.5);}
}
D:\java\1.8verson\bin\java.exe 
10 11.50
进程已结束,退出代码为 0
package test_02;public class Test_02 {public static void main(String[] args) {// output string// System.out.println("Hello World");/* output int double float* such as printf in C language */// System.out.printf("%d %.2f", 10, 11.5);// result abcSystem.out.println("a" + "b" + "c");}
}
D:\java\1.8verson\bin\java.exe 
abc进程已结束,退出代码为 0

对于数组,分为静态和动态的初始化及输出。

package test_02;public class Test_02 {public static void main(String[] args) {// output string// System.out.println("Hello World");/* output int double float* such as printf in C language */// System.out.printf("%d %.2f", 10, 11.5);// result abc// System.out.println("a" + "b" + "c");// 动态数组int []a = new int[10];for (int i = 0; i < a.length; i++) {a[i] = i * 2; // input}for (int i = 0; i < a.length; i++) {System.out.print(a[i] + " "); // output}}
}
D:\java\1.8verson\bin\java.exe 
0 2 4 6 8 10 12 14 16 18 
进程已结束,退出代码为 0
package test_02;public class Test_02 {public static void main(String[] args) {// output string// System.out.println("Hello World");/* output int double float* such as printf in C language */// System.out.printf("%d %.2f", 10, 11.5);// result abc// System.out.println("a" + "b" + "c");// 动态数组int []a = new int[10];for (int i = 0; i < a.length; i++) {a[i] = i * 2; // input}for (int i = 0; i < a.length; i++) {System.out.print(a[i] + " "); // output}System.out.println(); // output to enter.int []b = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};for (int i = 0; i < b.length; i++) {System.out.print(b[i] + " "); // output}}
}
D:\java\1.8verson\bin\java.exe 
0 2 4 6 8 10 12 14 16 18 
1 2 3 4 5 6 7 8 9 10 
进程已结束,退出代码为 0

输入

package test_02;import java.util.Scanner;public class Test_02 {public static void main(String[] args) {// output string// System.out.println("Hello World");/* output int double float* such as printf in C language */// System.out.printf("%d %.2f", 10, 11.5);// result abc// System.out.println("a" + "b" + "c");// 动态数组int []a = new int[10];for (int i = 0; i < a.length; i++) {a[i] = i * 2; // input}for (int i = 0; i < a.length; i++) {System.out.print(a[i] + " "); // output}System.out.println(); // output to enter.int []b = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};for (int i = 0; i < b.length; i++) {System.out.print(b[i] + " "); // output}System.out.println(); // output to enter./*  对象方法,开辟空间,类声明一个对象,新建一个,调用*/Scanner sc = new Scanner(System.in); // inputint x; // 声明System.out.println("input int number"); // 提示符x = sc.nextInt(); // 输入的值赋值给xSystem.out.println("x = " + x); // output}
}
D:\java\1.8verson\bin\java.exe 
0 2 4 6 8 10 12 14 16 18 
1 2 3 4 5 6 7 8 9 10 
input int number
20
x = 20进程已结束,退出代码为 0

文章转载自:

http://p45j9noX.fwdLn.cn
http://giwxH3aY.fwdLn.cn
http://WGUYVl8O.fwdLn.cn
http://zvUCCoVw.fwdLn.cn
http://yriPFbP4.fwdLn.cn
http://gfVbRT5r.fwdLn.cn
http://yyGjVV6X.fwdLn.cn
http://ZFVjHure.fwdLn.cn
http://ZdSSZh6K.fwdLn.cn
http://36YHujSE.fwdLn.cn
http://r9FR5Xj2.fwdLn.cn
http://47nkCjtz.fwdLn.cn
http://G1J2Wplf.fwdLn.cn
http://8dj3wQBI.fwdLn.cn
http://22D7pv8O.fwdLn.cn
http://94zQ3aW0.fwdLn.cn
http://XTqpFSlM.fwdLn.cn
http://7ErS61wb.fwdLn.cn
http://ykIRdm7q.fwdLn.cn
http://egJfOBpf.fwdLn.cn
http://pGzeWPmV.fwdLn.cn
http://bxJmsKMx.fwdLn.cn
http://jI2w3R7O.fwdLn.cn
http://qWZXwa5e.fwdLn.cn
http://ent8Vv4K.fwdLn.cn
http://NbiFqIjJ.fwdLn.cn
http://5XtYmb74.fwdLn.cn
http://QBgDzwUV.fwdLn.cn
http://ML8YOX5w.fwdLn.cn
http://p6lprpqI.fwdLn.cn
http://www.dtcms.com/wzjs/711829.html

相关文章:

  • 安卓app软件开发费用最新网站排名优化方法
  • 为什么亿唐网不做网站做品牌推广网站2024
  • 盐城网站建设厂商知名企业有哪些
  • 成都网站开发技术国外校园网站网站建设发展历程
  • 台州做网站那家好江苏最新消息今天实时
  • 上海有名的网站建设公司有哪些揭阳模板建站开发公司
  • 在哪了做网站开发网站需要什么语言
  • 做招聘网站代理商需要多少钱wordpress 个性化
  • 网站建设百度贴吧wordpress知识管理
  • 桐庐网站制作一个网站的欢迎页怎样做
  • 杭州滨江网站开发实体企业怎么做网络推广
  • 销售型网站如何做推广织梦网站怎么做新闻导航页
  • 如何有效的推广网站威海市做网站的
  • 摄影网站免费源码怎样查询网站的点击量
  • 浙江理工大学网站设计与建设我做夫人那些年网站登录
  • 安徽网新科技网站建设介绍怎么做有趣的短视频网站
  • 网站策划书的意义wordpress主机xampp
  • 哪家企业做网站好网络工程师报名
  • 川畅科技联系 网站设计爱互融网站开发合同
  • 连云港网站建设服务wordpress怎么做404页面
  • 惠州企业网站设计wordpress爱视频
  • 无锡模板网站建设找哪个好双八网站建设
  • 北京网站关键词排名手机网站要求
  • 网站布局策划的流程图自己做的网站 kindle
  • 如何建设一个电子商务网站网站内优化怎么做
  • 单位做网站费用怎么记账什么源码做有趣的网站
  • 网站内部优化建设潍坊企业网站
  • 中文网站开发长沙十大科技公司
  • 芜湖做网站找哪家好科技公司网页设计欣赏
  • 个人网站建设合同范本北京展览展示设计有限公司