# Search:

Type: Posts; User: rsala004

Page 1 of 2 1

by rsala004
Replies
9
Views
612

by rsala004
Replies
3
Views
971

3. ## Thread: Need Help With Project

by rsala004
Replies
2
Views
533

### Re: Need Help With Project

I just edited my post incase you read it a few moments ago

import java.util.*;

public class MorseCodeProj
{
public String Conversion(String s1){
String result = "";
4. ## Thread: I have algorithm problem

by rsala004
Replies
3
Views
971

### Re: I have algorithm problem

pretty clean ;]

works

wow im getting good at this ;] only took 5 minutes

public class sublist
{
5. ## Thread: savings and loan society

by rsala004
Replies
9
Views
612

### Re: savings and loan society

depending on the scope of the course you should likely not be expected to read from something such as an xls file.

try saving xls as a .CSV file.

Makes sheet turn into something like.
...
6. ## Thread: Converting Hex to Decimal

by rsala004
Replies
10
Views
17,949

### Re: Converting Hex to Decimal

not sure if applicable or not, but this may spark an idea...maybe

Decimal -> hex

String[] allHex = new String[(16*16*16)-1];

String key = "0123456789ABCDEFG";
7. ## Thread: savings and loan society

by rsala004
Replies
9
Views
612

### Re: savings and loan society

did you yourself put the data into the xls, or were you specifically told to put it in an xls file
8. ## Thread: GuessWhat- same errors repeated 4 times?

by rsala004
Replies
1
Views
657

### Re: GuessWhat- same errors repeated 4 times?

public static void getRandomNumber();
{
int min=50;
int max=100;
Random randGenerator= new Random();
int randomNum=randGenerator.nextInt(max-min+1)+ min;
System.out.println("Random number...

by rsala004
Replies
1
Views
717

### Re: McGeeLotto?????

that code will not work, unless the user actually picks the numbers in the EXACT order that it is randomized.

and also, most of the code is not even inside of a method, its just ...there.

your...
10. ## Thread: how do you leave a line space in java?

by rsala004
Replies
7
Views
7,513

### Re: how do you leave a line space in java?

you may have entered wrong slash, and typed it correctly here
11. ## Thread: Help starting program, need done by Nov 4

by rsala004
Replies
7
Views
626

### Re: Help starting program, need done by Nov 4

problem statement doesn't state that testscores are integers.
12. ## Thread: why is this statement evaluating false??

by rsala004
Replies
2
Views
999

### Re: why is this statement evaluating false??

you should always use EQUALS when comparing strings.

A String is an OBJECT, when doing String == String, you are asking computer to check if they are the same 'object'.

for example:

String...
13. ## Thread: new program (lotto.class)

by rsala004
Replies
7
Views
1,641

### Re: new program (lotto.class)

another good revision, for cleaner code? (btw i also used to program like that...using ints as 'on/off' toggles to signify things, but i try to avoid it.

Here we will redo the last while loop.

...
14. ## Thread: new program (lotto.class)

by rsala004
Replies
7
Views
1,641

### Re: new program (lotto.class)

if (TotalNumbers < 2) {
System.out.println ("error: Total number can not be less than 2");
done = done +1;
} else if (UserNumber > TotalNumbers){
System.out.println ("error: your number can't be...
15. ## Thread: how do you leave a line space in java?

by rsala004
Replies
7
Views
7,513

### Re: how do you leave a line space in java?

Characters (The Java™ Tutorials > Learning the Java Language > Numbers and Strings)

System.out.println("After copy method, is Date1 equal to Date2? \n");
if (Date2.equals(Date1))
...
16. ## Thread: decimal to hex

by rsala004
Replies
1
Views
3,001

### decimal to hex

i just need to be able to convert a (maximum) 3 digit decimal number to hex

Is this the best way to do it, or is there a simple way that i dont see?
(excluding any built in hex functionality for...
17. ## Thread: Object array to int array?

by rsala004
Replies
1
Views
3,994

### Object array to int array?

ArrayList<Integer> in = new ArrayList<Integer>();
//fill arraylist......
int[] out;

When using the ArrayList method toArray() it returns Object[], how would I go about converting this to...
18. ## Thread: Convert CHAR to STRING

by rsala004
Replies
11
Views
8,380

### Re: Convert CHAR to STRING

would

String word = "" + sex;

19. ## Thread: I need Help Creating A "for loop" for some really basic java code. Plz help

by rsala004
Replies
2
Views
703

### Re: I need Help Creating A "for loop" for some really basic java code. Plz help

you are going to have to use a for loop to move then a little bit at a time (each)

I see 5 things here, 4 squares and a triangle
boats 1 and 2, sails 1 2 and 3

We can move it to the right...
20. ## Thread: sieve of eratosthenes

by rsala004
Replies
5
Views
4,595

### Re: sieve of eratosthenes

^:)^

thanks, i think thats exactly what i was looking for.

but also with this sieve i think actually once you progress through 1 -> sqrt(n) you cover all non-prime multiples.
21. ## Thread: sieve of eratosthenes

by rsala004
Replies
5
Views
4,595

### sieve of eratosthenes

....................
22. ## Thread: Any ideas for begginer?

by rsala004
Replies
11
Views
1,174

### Re: Any ideas for begginer?

as mentioned project euler goes into the math and such, which isn't a bad thing but I think its more for people looking to improve their skill rather than learn basic syntax...for example lots of...
23. ## Thread: Iterator, with ArrayList

by rsala004
Replies
3
Views
907

### Re: Iterator, with ArrayList

xD

I found a solution a little while ago :O

by setting the type of the iterator, didnt know i could do it.

Iterator<word> itr = words.iterator();
24. ## Thread: Average program with array and loop and JOptionPane.

by rsala004
Replies
6
Views
6,630

### Re: Average program with array and loop and JOptionPane.

found String, expect int.

---
25. ## Thread: Iterator, with ArrayList

by rsala004
Replies
3
Views
907

### Iterator, with ArrayList

I get compile error when trying to use method of something i got off iterator.next()

first off, I have a class named word, it has a method called getWord which returns a String.

import...
Results 1 to 25 of 33
Page 1 of 2 1