Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #3198
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Jeff Higgins <jeff@invalid.invalid> |
| Newsgroups | comp.lang.java.help |
| Subject | Re: need hlp |
| Date | Mon, 09 Mar 2015 11:12:01 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 79 |
| Message-ID | <mdkd79$42o$1@dont-email.me> (permalink) |
| References | <f3168b74-7480-4c9f-8401-2f0e37a8ec8c@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Mon, 9 Mar 2015 15:11:37 +0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="c50a9e5d554cfaba13eda1c71e805135"; logging-data="4184"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/voPS5SQdvo5FNFZ1LtgJzwTso6azMT+Y=" |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0 |
| In-Reply-To | <f3168b74-7480-4c9f-8401-2f0e37a8ec8c@googlegroups.com> |
| Cancel-Lock | sha1:kVs6YJOnNYRWM2in3T+og4+oDVE= |
| Xref | csiph.com comp.lang.java.help:3198 |
Show key headers only | View raw
On 03/09/2015 08:22 AM, 12030122061@sicsr.ac.in wrote:
> class total
> {
> int a;
> int b;
> int c;
> int d;
> int e;
> }
> public class demo{
> public static void main (Sring args[])
> {
> int sum;
> }
> total b1 = new total();
> b1.a = S[0];
> b1.b = S[1];
> b1.c = S[2];
> b1.d = S[3];
> b1.e = S[4];
> x = a+b+c+d+e;
> b1.a = integer parseInt (a);
> b2.b = integer parseInt (b);
> b3.c = integer parseInt (c);
> b4.d = integer parseInt (d);
> b5.e = integer parseInt (e);
> System.out.println(x);
> }
>
package scratch;
import java.util.Random;
public class Total {
private int a, b, c, d, e;
private static Random rnd = new Random();
/**
* Constructs a Total instance with random instance variables.
*/
public Total() {
}
/**
* Parses a String array to initialize the Total instance variables.
*
* @param S
* an array of Strings representing five integers.
*/
public Total(String[] S) {
}
/**
* Sums this Total instance variables.
*
* @return the sum of this Total's instance variables.
*/
public int sum() {
int x = a + b + c + d + e;
return x;
}
}
******************************************************
package scratch;
public class TotalDemo {
public static void main(String[] args) {
System.out.println(new Total(args).sum());
}
}
Back to comp.lang.java.help | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
need hlp 12030122061@sicsr.ac.in - 2015-03-09 05:22 -0700 Re: need hlp Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-03-09 09:44 -0400 Re: need hlp Jeff Higgins <jeff@invalid.invalid> - 2015-03-09 11:12 -0400 need hlp Lew <lewbloch@gmail.com> - 2015-03-13 22:41 -0700
csiph-web