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.

VPSMS:53元/月KVM-512MB/15G SSD/1TB/洛杉矶CN2 GIA

VPSMS最近在做两周年活动,加上双十一也不久了,商家针对美国洛杉矶CN2 GIA线路VPS主机提供月付6.8折,季付6.2折优惠码,同时活动期间充值800元送150元。这是一家由港人和国人合资开办的VPS主机商,提供基于KVM架构的VPS主机,美国洛杉矶安畅的机器,线路方面电信联通CN2 GIA,移动直连,国内访问速度不错。下面分享几款VPS主机配置信息。CPU:1core内存:512MB硬盘:...

【IT狗】在线ping,在线tcping,路由追踪

IT狗为用户提供 在线ping、在线tcping、在线路由追踪、域名被墙检测、域名被污染检测 等实用工具。【工具地址】https://www.itdog.cn/【工具特色】1、目前同类网站中,在线ping 仅支持1次或少量次数的测试,无法客观的展现目标服务器一段时间的网络状况,IT狗Ping工具可持续的进行一段时间的ping测试,并生成更为直观的网络质量柱状图,让用户更容易掌握服务器在各地区、各线...

GigsGigsCloud:$16/月KVM-1GB/30GB/1TB/1.6T高防/洛杉矶CN2 GIA+AS9929

GigsGigsCloud是一家成立于2015年老牌国外主机商,提供VPS主机和独立服务器租用,数据中心包括美国洛杉矶、中国香港、新加坡、马来西亚和日本等。商家VPS主机基于KVM架构,绝大部分系列产品中国访问速度不错,比如洛杉矶机房有CN2 GIA、AS9929及高防线路等。目前Los Angeles - SimpleCloud with Premium China DDOS Protectio...

java代码大全为你推荐
bean是什么意思在jdbc的DAO是什么意思?还有bean?ae序列号ae序列号prisma安卓版Prisma安卓版能不能用视频托管如何把视频上传到自己公司的网站上?求解···素数算法什么是素数算法pps官网pps官方下载,pps播放器下载selectintooracle有select into临时表的用法吗淘码除了爱码,现在哪个验证码平台还能用彩信平台请问彩信平台升级怎么改参数能告诉我具体步骤吗?在线沟通有效沟通的六个要点
大庆服务器租用 域名查询工具 赵容 softlayer 电影服务器 omnis 20g硬盘 sub-process godaddy优惠券 天猫双十一秒杀 tk域名 太原联通测速平台 phpmyadmin配置 hdd 视频服务器是什么 带宽租赁 网站加速软件 服务器论坛 cdn网站加速 主机返佣 更多