[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
ClanKiller.com - View topic - anyone here do Java?
It is currently Sat Nov 23, 2024 7:23 am



Reply to topic  [ 54 posts ]  Go to page 1, 2, 3, 4  Next
anyone here do Java? 
Author Message
Minor Diety
User avatar

Joined: Fri Apr 11, 2003 2:17 pm
Posts: 7721
Location: Centre of the sun
Reply with quote
Post anyone here do Java?

_________________
"Well a very, very hevate, ah, heavy duh burtation tonight. We had a very derrist derrison, bite, let's go ahead and terrist teysond those fullabit who have the pit." - Serene Branson


Mon Feb 21, 2005 1:25 pm
Profile
Duke
User avatar

Joined: Mon Mar 31, 2003 8:59 am
Posts: 1358
Location: right behind you
Reply with quote
Post 


Tue Feb 22, 2005 8:52 am
Profile YIM WWW
Minor Diety
User avatar

Joined: Fri Apr 11, 2003 2:17 pm
Posts: 7721
Location: Centre of the sun
Reply with quote
Post 
Mmm, your idea seems to be ok, but now it sais the char "continuing" variable has not been initialised. WTF, yes it has, its in bold BTW.

******************************************
public static void main(String args[])
{
String studentNumber;
Student thisStudent;
boolean continuing = true;
char response;
char selection;
while (continuing == true)
selection = IO.readChar(version + "\n\nPlease input 1, 2, 3 or 4");
switch (selection)
{
case '1': // do this do that blah blah... ... ...
*****************************************************

_________________
"Well a very, very hevate, ah, heavy duh burtation tonight. We had a very derrist derrison, bite, let's go ahead and terrist teysond those fullabit who have the pit." - Serene Branson


Tue Feb 22, 2005 9:09 am
Profile
Duke
User avatar

Joined: Mon Mar 31, 2003 8:59 am
Posts: 1358
Location: right behind you
Reply with quote
Post 


Tue Feb 22, 2005 9:32 am
Profile YIM WWW
Minor Diety
User avatar

Joined: Fri Apr 11, 2003 2:17 pm
Posts: 7721
Location: Centre of the sun
Reply with quote
Post 
Sorry, i meant selection has not been initialised

//EDIT - Fixed this, i added some brakets for the WHILE loop.

Though, the damn thing doesnt loop!!!

//EDIT - Now it does. I removed a semi-colon.

THANKS PIGGIE FOR THE ADVICE ON THE == OPERATOR!!!

*KISSES PIGS LOVELY THIGHS*

_________________
"Well a very, very hevate, ah, heavy duh burtation tonight. We had a very derrist derrison, bite, let's go ahead and terrist teysond those fullabit who have the pit." - Serene Branson


Tue Feb 22, 2005 9:37 am
Profile
Duke
User avatar

Joined: Mon Mar 31, 2003 8:59 am
Posts: 1358
Location: right behind you
Reply with quote
Post 
Some languages keep a variable within level it is defined. Moving into a deeper or shallower level of brackets make the var go out of scope. eg:

str var = 'foo';
print var; //returns 'foo'
for(;;)
{
printvar; //undefined
str var = 'bar';
print var; //returns 'bar';
}
print var; //returns 'foo'

Again, I don't know if java is like this, but try initializing the variable within the brackets you are using it.


Tue Feb 22, 2005 9:46 am
Profile YIM WWW
Duke
User avatar

Joined: Mon Mar 31, 2003 8:59 am
Posts: 1358
Location: right behind you
Reply with quote
Post 
good deal. Thanks for the kisses.


Tue Feb 22, 2005 9:47 am
Profile YIM WWW
King
User avatar

Joined: Wed Apr 16, 2003 2:18 pm
Posts: 1976
Location: Sexy Town
Reply with quote
Post 

_________________
Contrary to popular belief, America is not a democracy, it is a Chucktatorship.


Tue Feb 22, 2005 10:30 am
Profile ICQ YIM
Minor Diety
User avatar

Joined: Fri Apr 11, 2003 2:17 pm
Posts: 7721
Location: Centre of the sun
Reply with quote
Post 

_________________
"Well a very, very hevate, ah, heavy duh burtation tonight. We had a very derrist derrison, bite, let's go ahead and terrist teysond those fullabit who have the pit." - Serene Branson


Tue Feb 22, 2005 10:36 am
Profile
Duke
User avatar

Joined: Mon Mar 31, 2003 8:59 am
Posts: 1358
Location: right behind you
Reply with quote
Post 
ROFL


Tue Feb 22, 2005 11:41 am
Profile YIM WWW
Minor Diety
User avatar

Joined: Fri Apr 11, 2003 2:17 pm
Posts: 7721
Location: Centre of the sun
Reply with quote
Post 
Why doesnt Java like the formula:

return (X / 100 * 60) + (Y / 100 * 40) / 2;

_________________
"Well a very, very hevate, ah, heavy duh burtation tonight. We had a very derrist derrison, bite, let's go ahead and terrist teysond those fullabit who have the pit." - Serene Branson


Wed Mar 23, 2005 6:28 am
Profile
Minor Diety
User avatar

Joined: Mon Mar 31, 2003 1:43 am
Posts: 4320
Reply with quote
Post 
coz its an ass.

try making a variable that works that out, then just return the variable.


Wed Mar 23, 2005 8:30 am
Profile WWW
Minor Diety
User avatar

Joined: Fri Apr 11, 2003 2:17 pm
Posts: 7721
Location: Centre of the sun
Reply with quote
Post 
I shouldnt need to because the class specification im working with doesnt include a variable as an attribute. It merely sais that a method will suffice.

_________________
"Well a very, very hevate, ah, heavy duh burtation tonight. We had a very derrist derrison, bite, let's go ahead and terrist teysond those fullabit who have the pit." - Serene Branson


Wed Mar 23, 2005 10:11 am
Profile
Minor Diety
User avatar

Joined: Mon Mar 31, 2003 1:43 am
Posts: 4320
Reply with quote
Post 
hmmm well its like 2 years since i did java now...

not something daft like the method itself being declared wrong so its unable to return anything? whats the error its giving you?


Wed Mar 23, 2005 12:53 pm
Profile WWW
Minor Diety
User avatar

Joined: Fri Apr 11, 2003 2:17 pm
Posts: 7721
Location: Centre of the sun
Reply with quote
Post 
Its not returning an error, its retirning 0.0 as a value.

Ill mess around with data types, see if that gets me anywhere.

_________________
"Well a very, very hevate, ah, heavy duh burtation tonight. We had a very derrist derrison, bite, let's go ahead and terrist teysond those fullabit who have the pit." - Serene Branson


Thu Mar 24, 2005 6:23 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 54 posts ]  Go to page 1, 2, 3, 4  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.