User Profile

Collapse

Profile Sidebar

Collapse
jca613
jca613
Last Activity: Apr 22 '10, 10:39 AM
Joined: Mar 10 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jca613
    replied to Math.random and Arrays
    in Java
    i honestly i have no idea.my brain is like frying trying to figure this out. do i do something like make another loop array? and put char, then count digitis.
    See more | Go to post

    Leave a comment:


  • jca613
    replied to Math.random and Arrays
    in Java
    public class hw_7{

    public static void main(String[] args){
    int[] anArray = new int[100];
    for(int index =0; index <anArray.length ; index++){
    anArray[index] = (int) (Math.random()* 10);
    }
    for(int element = 0; element < anArray.length; element++) {
    System.out.prin tln("anArray[" + element + "]\t" + anArray[element]);...
    See more | Go to post

    Leave a comment:


  • jca613
    started a topic Math.random and Arrays
    in Java

    Math.random and Arrays

    this what i got so far. i understand arrays and Math.random i think,but i need to use Math.random and arrays to make 100 random integers between 1 -9 what am i doing wrong? and what am i missing


    import java.util.*;

    import javax.swing.JOp tionPane;
    public class hw_7 {

    public static void main(String[] args){
    Scanner input=new Scanner(System. in);
    int Random =input.nextInt( );...
    See more | Go to post

  • jca613
    replied to Help with convertMills
    in Java
    thanks well i got it done
    See more | Go to post

    Leave a comment:


  • jca613
    replied to Help with convertMills
    in Java
    import java.util.*;
    public class hw_6 {

    public static void main(String[] args){

    System.out.prin tln("How much Millseconds ");

    get millis; from input;


    System.out.prin tln(convertMill is(millis) );
    }
    //return string

    private static String convertMillis(l ong millis) {
    StringBuffer sb = new StringBuffer();
    sb.append(hours );...
    See more | Go to post

    Leave a comment:


  • jca613
    replied to Help with convertMills
    in Java
    mport java.util.*;
    public class hw_6 {
    public static void main(String[] args){
    }

    private static String convertMillis(l ong millis) {
    System.out.prin t("How much Millseconds ");
    long time = millis / 1000;
    int seconds = ((int)(time % 60));
    int minutes = ((int)((time % 3600) / 60));
    int hours = ((int)(time / 3600));
    return convertMillis(0 ) ;
    }

    private...
    See more | Go to post

    Leave a comment:


  • jca613
    replied to Help with convertMills
    in Java
    it doesn't matter i guess. as long it turns out like something like this 154:19:10 when the progarm is done. so it being hours:Minutes:S econds
    See more | Go to post

    Leave a comment:


  • jca613
    replied to Help with convertMills
    in Java
    Converting Milliseconds to Time

    import java.util.*;
    public class hw_6 {
    public static void main(String[] args){
    }

    public static void convertMillis(l ong millis){
    System.out.prin t("How much Millseconds ");
    long Millis =0;
    long time = Millis / 1000;
    int seconds = ((int)(time % 60));
    int minutes = ((int)((time % 3600) / 60));
    int hours =...
    See more | Go to post

    Leave a comment:


  • jca613
    started a topic Help with convertMills
    in Java

    Help with convertMills

    i have hard time doing this program.a example i have to is a string returning as hours:minutes:s econds, like convertMillis(5 500) returns a string 0:0:5, convertMillis(1 00000) returns a string, 0:140:. and convertMillis(5 55550000) 154:19:10. i am like having a brain bust lately and cant figure how to come make one and compile.Anyone help me? i have to make millseconds to hours:minutes:s econds
    See more | Go to post
No activity results to display
Show More
Working...