说明(因为Java中java Application的参数都是默认的字符型的数据,所以需要强制类型转换这一步骤)

设计思想:

向系统里输入若干个参数,计算出参数个数,利用for语句计算出参数的和。(程序中需要进行强制类型转换,因为java Application中的数据是字符型的,不能进行运算),最后输出参数的和

流程图:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAIBCAIAAACa9mGnAAAgAElEQVR4nO3dLWwrzdnw8YUHGkZFgYaG0aCQR41U4koFKbkVVdUoJe9x2/tuzQ4M9MUCAyOVBFSaqCjwwMCAAYaGhoH7gvXH+mttb3Z3duf6/8DTnMR2dqNb839mdzxOxuPxv//9799+++3XX3/9xz/+8fe//300Gn3//v379+//D1BmNBr985///O233/71r3/9+uuv379//9vf/vaXv/zll19++eWXX/785z//6U9/+uMf//iHP/zh97///f8B6iV/BQCglOSvf/1rCgDA+UgIAKAkEgIAKImEAABKIiEAgJJICACgJBICACiJhAAASiIhAICSSAgAoCQSAgAoiYQAAEoiIQCAkkgIAKAkEgIAKImEAABKIiEAgJJICACgJBICACiJhAAASiIhAICSSAgAoCQSAgAoiYQAAEoiIQCAkkgIAKAkEgIAKImEAABKIiEAgJJICACgJBICACiJhAAASiIhAICSSAgAoCQSAgAoiYQAAEoiIQCAkkgIAKAkEgIAKImEAABKIiEAgJJICACgJBICACiJhAAASiIhAICSSAgAoCQSAgAoiYQAAEoiIQCAkkgIAKAk1Qn5z3/+E/oQAGjX6YGIhABASJ0eiEgIAITU6YGIhABASJ0eiEgIAITU6YGIhABASJ0eiEgIAITU6YGIhABASJ0eiEgIAITU6YGIhABASJ0eiEgIAITU6YGIhABASJ0eiEgIAITU6YGIhABASJ0eiEgIAITU6YGIhABASJ0eiKJKyH/OF/qQAWjX6YErqoQAAJpEQgAAJWlPSJIkSZKEPgqcajabTSaTHyG8vr6GPnugdUgICemM19fXfr8/Go2CJOTm5mY4HH5+fob+MwAtQkJISDfMZrN+vz+fzwMew8PDw3g8DngAQNuQEBLSDZPJZDQahT2G+Xze6/XCHgPQ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USAg1ICJpTX0JWl6xy84vljGPBWeuy7239oCYkBBqQEDSnxtvpi2mGEbc3Ic5mN0oWN0nE1D8RISHQgISgOXUlxItd9SC/Kiu7ve7s+kZ77g0jG28kqQEJgQYkBM3h3elAZEgImkNCgMiQEDSHhACRISFoDgkBIkNC0BwSAkSGhLWN++EAAAF+SURBVKA5JASIDAlBc0gIEBkSguaQECAyJATNmc1mFxcXoY+iISQEGpAQNKrX683n89BHUbuPj49+vx/6KIDakRA06u7u7unpKfRR1G4ymYxGo9BHAdSOhKBR8/m83+9Pp9PQB1KjbAqiYbIFkBA07f39vd/vPzw8vL29hT6WKn1+fr69vY3H48Fg8P7+HvpwgCaQEAQwn8/H4/H19fX2x9F22bdv366vrx8eHj4/P0P/gYGGkBAAQEkkBABQEgkBAJREQgAAJZEQAEBJJAQAUBIJAQCUREIAACWREABASSQEAFASCQEAlERCAAAlkRAAQEkkBABQEgkBAJREQgAAJZEQAEBJJAQAUBIJAQCUREIAACWREABASSQEAFASCQEAlERCAAAlkRAAQEkkBABQEgkBAJREQgAAJZEQAEBJJAQAUBIJAQCUREIAACWREABASSQEAFASCQEAlERCAAAlkRAAQEkkBABQEgkBAJREQgAAJZEQAEBJJAQAUNL/B8FRgy1FjCkFAAAAAElFTkSuQmCC" alt="" />

程序源代码:

package demo;

public class CommandParameter {

    /**
* @param args
*/
public static void main(String[] args) { // TODO Auto-generated method stub
System.out.println("参数个数:"+ args.length);
int m=0;
for(String arg : args)
{ m=m+Integer.parseInt(arg); }
System.out.println(m);
} }

Java代码之输出参数和(强制类型转换)的更多相关文章

  1. java提高篇(十)-----强制类型转换

    在java中强制类型转换分为基本数据类型和引用数据类型两种,这里我们讨论的后者,也就是引用数据类型的强制类型转换. 在Java中由于继承和向上转型,子类可以非常自然地转换成父类,但是父类转换成子类则需 ...

  2. Java开发笔记(七)强制类型转换的风险

    编码过程中,不但能将数字赋值给某个变量,还能将一个变量赋值给另一个变量.比如下面代码把整型变量changjiang赋值给整型变量longRiver: // 长江的长度为6397千米 int chang ...

  3. Java中数据类型默认转换和强制类型转换

    默认转换: a:由低到高一次为:(byte   short    char  )---int ---long ---float --- double b:注意:byte   short    char ...

  4. Java中复合赋值运算符自动进行强制类型转换

    public class Operation { public static void main(String[] args) { int num1 = 10; num1 = num1 / 2.2; ...

  5. java代码--------随机输出100个随机数,要求每行10个数

    总结:不敢爱你么开口 package com.sads; ///实现随机输出100个数字,数字是0到9之间,每行输出10个 public class Wss { public static void ...

  6. java代码实现输出指定以.java结尾的文件的绝对路径

    package 输出指定文件绝对路径; import java.io.File; /* * 需求:请大家把"E:\\JAVA语言"文件夹下全部的java结尾的文件的绝对路径给输出在 ...

  7. 今天聊一聊Java引用类型的强制类型转换

    实际上基本类型也是存在强制类型转换的,这里简单提一下.概括来讲分为两种: 1.自动类型转换,也叫隐式类型转换,即数据范围小的转换为数据范围大的,此时编译器自动完成类型转换,无需我们写代码 2.强制类型 ...

  8. Java代码输出到txt文件(申请专利贴源码的必备利器)

    最近公司在申请专利,编写不少文档,项目的代码量实在是过于庞大.如果一个一个的复制粘贴虽然能够完成,但是对于程序员而言实在没有这个必要.shell或者python就能解决这个问题.由于我个人对于shel ...

  9. 关于 调用 JNI JAR 的说明和注意事项,调用第三方 JAR SDK 和 翻译 安卓 JAVA 代码 的说明 V2015.6.10

    关于 调用 JNI JAR 的说明和注意事项,调用第三方 JAR SDK 和 翻译 安卓 JAVA 代码 的说明 V2015.6.10 转载请标明出处,否则死全家.选择[复制链接]即可得到出处. (* ...

随机推荐

  1. 登录验证全局控制的几种方式(session)

    在登陆验证或者其他需要用到session全局变量的时候,归结起来,主要有以下三种较方便的实现方式.(其中个人较喜欢使用第一种实现方法) 一,在一个公共类里创建一个公共方法,然后需要验证的页面都调用这个 ...

  2. Windows系统架构

    操作系统模型   大多数操作系统中,都会把应用程序和内核代码分离运行在不同的模式下.内核模式访问系统数据和硬件,应用程序运行在没有特权的模式下(用户模式),只能使用有限的API,且不能直接访问硬件.当 ...

  3. ehcache.xml配置参数

    <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLoc ...

  4. windows环境下解决web服务假死的问题

    最近在windows系统在部署web服务器,发现很不稳定.web服务有容易假死,改过配置换过各种web软件,如apache.nginx都不管用. 所以干脆做个简易的定时检测Web服务状态的软件.一旦w ...

  5. ASP.NET Zero--10.一个例子(3)商品分类管理-新建

    1.打开Index视图 页面中添加一个按钮,代码如下: <div class="row margin-bottom-5"> <div class="co ...

  6. 用python计算lda语言模型的困惑度并作图

    转载请注明:电子科技大学EClab——落叶花开http://www.cnblogs.com/nlp-yekai/p/3816532.html 困惑度一般在自然语言处理中用来衡量训练出的语言模型的好坏. ...

  7. Kattis - Biased Standings

    Biased Standings Usually, results of competitions are based on the scores of participants. However, ...

  8. 【原】手写一个promise

    上一篇文章中,我们介绍了Promise的基本使用,在这篇文章中,我们试着自己来写一个Promise,主要是学习Promise的内部机制,学习它的编程思想. !!!备注:本文写的不好,仅供自己学习之用, ...

  9. 第一百三十四节,JavaScript,封装库--遮罩锁屏

    JavaScript,封装库--遮罩锁屏 封装库新增1个方法 /** zhe_zhao_suo_ping()方法,将一个区块元素设置成遮罩锁屏区块 * 注意:一般需要在css文件将元素设置成隐藏 ** ...

  10. 【CodeVS】1293

    输入输出样例 思路:看到题目我萌第一眼想到的肯定是求联通快对吧,但是这个联通快有点奇特,因为 这样他也算是一个联通快.解决此题其实有三种解法:1)宽搜(这个符合基本法):2)并查集:3)灌水法 但是蒟 ...