random link, stay away... -.-
Type: Posts; User: rsala004
random link, stay away... -.-
ah your right :)
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 = "";
pretty clean ;]
works
wow im getting good at this ;] only took 5 minutes
public class sublist
{
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.
...
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";
did you yourself put the data into the xls, or were you specifically told to put it in an xls file
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...
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...
you may have entered wrong slash, and typed it correctly here
problem statement doesn't state that testscores are integers.
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...
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.
...
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...
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))
...
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...
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...
would
String word = "" + sex;
be considered bad code?
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...
^:)^
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.
....................
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...
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();
int[] array = new int[numberOfGradesString]
found String, expect int.
try using Integer.parseInt(numberOfGradesString)
int[] array = new int[Integer.parseInt(numberOfGradesString)]
---
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...