Please HELP me URGENT
Posted by shoyeb4me (shoyeb4me), 15 October 2006I am a novish in Java Wolrd. I m trying to learn it. Anyway I am getting one problem while I am trying to solve one
problem. The problem is
First you have create an array A of unsorted random integers and will have to repoduce an array B which contains
all integres from A without repetitions.
For example, given array A = [1,2,5,6,6,3,3,2,9,6,8], the program will produce array B = [1,2,5,6,3,9,8] where no
repetitions are allowed .
If anybody please help me by providing code I will be very happy and greatful.It will help me to learn.
Thank u all.
Posted by admin (Graham Ellis), 15 October 2006Post up your code so far, and we'll have a look.
By the way ... you shout that your requirement is urgent. We look at questions within 24 hours on this forum - if you need something quicker than that, I would suggest you ask elsewhere.
Posted by shoyeb4me (shoyeb4me), 15 October 2006import java.io.*;
public int rnd;
public static boolean InChk = false;
public int gArray=0;
public static void main(String args)
RandomInteger ran = new RandomInteger();
public int getIntegerArraySize(String s)
BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
public void getRandomArray()
arr=gar("how many numbers");
rnd = new int [arr];
for(int i=0; i<arr; i++)
System.out.println(" ["+(i+1)+"] = "+rnd[i]);
i did that so far. please help me. its not urgent within 24hr. if it takes time its ok but if u could plz help me in a week. thanks a lot
Posted by admin (Graham Ellis), 15 October 2006Looks like you could do it with two nested loops - outer loop to check each element in turn, inner loop to see if it's already been copied across; here's an example of the algorithm in Perl for you to translate.
earth-wind-and-fire:~/oct06 grahamellis$ perl plsh
9 11 10 0 11 8 8 0 0 13 4 14 1 2 10 8 8 2 14 3
9 11 10 0 8 13 4 14 1 2 3
Posted by ac3buddy (ac3buddy), 10 January 2007I need a source code for a java program that converts a time in a 12 hour notation to 24 hour notation and vice versa in javax.swing
1.Create a file, Time.java using a text editor that will accepts time in 24-hour notation and output in 12-hour notation via console and using javax.swing package. A sample run are given below:
Sample Run 1:
Input time in 24-hour notation: 0101
Equivalent time in 12-hour notation: 1:01 a.m
Sample Run 2:
Input time in 24-hour notation: 0900
Equivalent time in 12-hour notation: 9:00 a.m
Sample Run 3:
Input time in 24-hour notation: 1430
Equivalent time in 12-hour notation: 2:30 p.m
Posted by admin (Graham Ellis), 10 January 2007Hello, ac3buddy.
If you post up a sample of the code you're trying and describe the problems it's giving you, we'll try and help you. Typically, we respond here within 24 hours to such requests. If you need something quicker, you're probably going to be better asking elsewhere / using a paid support service.
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: email@example.com • WEB: http://www.wellho.net • SKYPE: wellho