• Log in or sign up for an account here: https://www.sythe.org/login

java hwk help lol

khalsa

Forum Addict
Joined
Feb 15, 2007
Sythe Gold
0
Messages
326
yeah need help with this java work,if this not allowed den dlete,erm might be willing to pay rs gp if some1 can do all for me.

basically i have to do a mandatory java class and i have no clue what to do lol
----------------------------------------------------------------------------------

1)What are all possible results of the expression (n % m), where n and m are integer variables?

2) int myFirstValue = 3;
int mySecondValue = 5;

// print initial values
System.out.print("myFirstValue - " + myFirstValue);
System.out.print("mySecondValue - " + mySecondValue);

// assign values
mySecondValue = myFirstValue;

// print modified values
System.out.print("myFirstValue - " + myFirstValue);
System.out.print("mySecondValue - " + mySecondValue);


^^ what does that code print

3)Write a for loop which prints the values 5 10 15 20 25 30 35 40. You are advised to use the CodePad to test your code works.

4)Write a for loop which loops 26 times and thereby prints the characters ABCDEF....Z. You are advised to use the CodePad to test your code works.

You are reminded that System.out.print((char)65); will print out the single character A (because the character value of an 'A' is 65). The character value of an 'B' is 66, etc

5)Write a for loop which uses an iteration variable of type double. This should start with a value of 0.5, iterate by steps of 0.3 until the iteration variable exceeds 2. Run the loop, maybe using the CodePad. What is produced? Explain why. Hint: how are floating point ('real') numbers stored?

6)
public int refundBalance()
{
return balance;
balance = 0;
}

What do you know about return statements that helps to explain why this version does not compile?
 
you explain shit really bad.

o... this is the actual assignment lul...

well.. i would show up your teacher by ... doing this..

really turn what im about to put here lol

Code:
public class test {

int myFirstValue = 3;
int mySecondValue = 5;

System.out.print("myFirstValue - " + myFirstValue);
System.out.print("mySecondValue - " + mySecondValue);

mySecondValue = myFirstValue;

System.out.print("myFirstValue - " + myFirstValue);
System.out.print("mySecondValue - " + mySecondValue);

public int refundBalance()
{
return balance;
balance = 0;
}

public int loop(); {
learn java :)

}
}


ok dude now.. you have to learn so you do the rest :D
 
<3 n4n0
Discord Verified
Two Factor Authentication User
Community Participant
Spam Forum Participant
Sythe's 10th Anniversary
Sythe Awards 2011 Winner
PM me your MSN... Or aim... I will help you through this...
 
Runescape Gamblingrunescape gambling
Back
Top