java代码大全求Java源程序代码,一整套的就可以,不限制类型

java代码大全  时间:2021-06-25  阅读:()

一个java代码

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 importjava.util.Scanner; ? lassDemo?{ ????publicstaticvoidmain(String?args[]) ????{ ????????System.out.println("小A想请假,请输入天数:"); ????????Scanner?s?=?newScanner(System.in); ????????intN=s.nextInt(); ????????if(N==1) ????????????System.out.println("想请假"+N+"?天,班长意见(Y?or?N):"); ????????elseif(N==2) ????????????System.out.println("想请假"+N+"?天,班主任意见(Y?or?N):"); ????????elseif(N==3) ????????????System.out.println("想请假"+N+"?天,校长意见(Y?or?N):"); ????????else{ ????????????System.out.println("想请假"+N+"?天,请假太多,不批:"); ????????????return; ????????} ???????? ????????String?a?=?s.next(); ????????if(a.equalsIgnoreCase("Y")) ????????????System.out.println("请假同意!"); ????????else ????????????System.out.println("不同意!"); ????} }

JAVA 编写完整代码

public class test1 { ?public static void main(String[] args) { ?? Scanner scan = new Scanner(System.in); ?? System.out.println("请输入本月税前工资"); ?? double d = scan.nextDouble(); //税前工资 ?? double sal= d - 3500; // 减去扣除数的 ?? double salary = 0; //初始化工资 ?? if(sal<=1500){ ???? salary = sal*0.03; ?? }else if(sal<=4500){ ??? salary = sal*0.1-105; ?? }else if(sal<=9000){ ??? salary = sal*0.2-555; ?? }else if(sal<=35000){ ??? salary = sal*0.25-1005; ?? }else if(sal<=55000){ ??? salary = sal*0.3-2755; ?? }else if(sal<=80000){ ??? salary = sal*0.35-5505; ?? }else{ ??? salary = sal*0.45-13505; ?? } ?? System.out.println("个人所得税的缴纳额度为:"+salary+"元"); ?} } 1. 尽量简化逻辑 像钱的多少 先用变量存储起来 再带入就好了 2. 尽量简化代码? 像输出也只用一句然后带入就好了 3. 尽量自己考虑 每一点问题都是自己敲代码的过程中产生然后明白的 4. 这题是我原题? 我知道你在哪? 既然在那了 为什么还不努力呢

java新手,求完整的源代码

//都是从新手过来的,以下代码供参考 //1. public?class?ount?{ private?static?String?tnum; private?static?double?money; private?static?void?t()?{ System.out.println("账号为:?"?+?tnum); } private?static?void?showMoney()?{ System.out.println("余额为:?"?+?money); } public?ount(String?,?double?m)?{ tnum?=?; this.money?=?m; } public?static?void?main(String[]?args)?{ ount?ba?=?new?ount("626600018888",?5000.00); t(); ba.showMoney(); } }//2. public?class?Triangle?{ private?static?float?a; private?static?float?b; private?static?float?c; public?Triangle(float?a,?float?b,?float?c)?{ this.a?=?a; this.b?=?b; this.c?=?c; } public?static?boolean?judgeTriangle(float?a,?float?b,?float?c)?{ if?((a?>?Math.abs(b?-?c)?&&?a??Math.abs(a?-?c)?&&?b??Math.abs(a?-?b)?&&?c?求Java源程序代码,一整套的就可以,不限制类型//Threader.java import java.awt.Graphics; import java.awt.Color; public class Threader extends java.awt.Canvas implements Runnable { int myPosition =0; String myName; int numberofSteps=600; boolean keepRunning = true; //构造函数 public Threader (String inName){ myName=new String (inName); } public synchronized void paint(Graphics g){ //为线程竞赛画一条直线 g.setColor (Color.black); g.drawLine (0,getSize().height/2,getSize().width,getSize().height/2); //画竞赛者. g.setColor (Color.yellow); g.fillOval((myPosition*getSize().width/numberofSteps),0,15,getSize().height); } public void (){ keepRunning = false; } public void run(){ //循环直到竞赛停止 while ((myPosition numberofThreadsAtStart+2){ try{ thisThread.sleep(100); } catch (InterruptedException e){ System.out.println("thisThread was interrupted"); } } //停止竞赛 if (inApplet){ (); destroy(); } else System.exit(0); } public static void main (String argv[]){ inApplet=false; //监测在线竞赛者的数量. if (argv.length>0) racerCount = Integer.parseInt(argv[0]); //创建一个新的界面 Frame theFrame = new Frame("The Great Thread Race"); GreatRace theRace = new GreatRace(); theFrame.setSize(400,200); theFrame.add ("Center",theRace); theFrame.show(); theRace.init(); theFrame.pack(); theRace.start(); } }//end class GreatRace.

PQ.hosting全线9折,1Gbps带宽不限流量VPS/€3/月,全球11大机房可选

Hostadvice主机目录对我们的服务进行了测试,然后给PQ.hosting颁发了十大WordPress托管奖。为此,宣布PQ.Hosting将在一周内进行折扣优惠,购买和续订虚拟服务器使用优惠码:Hostadvice ,全部优惠10%。PQ.hosting,国外商家,成天于2019年,正规公司,是全球互联网注册商协会 RIPE 的成员。主要是因为提供1Gbps带宽、不限流量的基于KVM虚拟的V...

UCloud新人优惠中国香港/日本/美国云服务器低至4元

UCloud优刻得商家这几年应该已经被我们不少的个人站长用户认知,且确实在当下阿里云、腾讯云服务商不断的只促销服务于新用户活动,给我们很多老用户折扣的空间不多。于是,我们可以通过拓展选择其他同类服务商享受新人的福利,这里其中之一就选择UCloud商家。UCloud服务商2020年创业板上市的,实际上很早就有认识到,那时候价格高的离谱,谁让他们只服务有钱的企业用户呢。这里希望融入到我们大众消费者,你...

水墨云历史黑名单IDC,斟酌选购

水墨云怎么样?本站黑名单idc,有被删除账号风险,建议转出及数据备份!水墨云ink cloud Service是成立于2017年的商家,自2020起开始从事香港、日本、韩国、美国等地区CN2 GIA线路的虚拟服务器租赁,同时还有台湾、国内nat vps相关业务,也有iplc专线产品,相对来说主打的是大带宽服务器产品。注意:本站黑名单IDC,有被删除账号风险,请尽量避免,如果已经购买建议转出及数据备...

java代码大全为你推荐
郭列90后的杰出代表有那些?公众号付费阅读如何申请微信付费阅读功能公众号付费阅读怎么利用公众号做知识付费?qq管家官网在qq电脑管家官网有个可以登录qq的。登录上了可以加速么?java程序员招聘java程序员学出来工作好不好找,工资咋样?全局钩子加载全局钩子是什么,每次进入股票软件都说加载全局钩子,是中病毒了吗za是哪个国家的IE是哪个国家的缩写特斯拉model3降价特斯拉官网为何会被挤崩?泛微协同办公系统谁能告诉我泛微OA,协同性是体现在哪几个方面的?泛微有哪些优势??flash序列号Flash软件 的序列号是什么?
便宜域名注册 广东vps 万网域名解析 万网域名管理 t牌 webhostingpad 韩国加速器 京东云擎 淘宝双十一2018 parseerror 青果网 国外php空间 ibrs 500m空间 牛人与腾讯客服对话 ca4249 日本bb瘦 最好的免费空间 酷番云 免费网页申请 更多