Any java fags here?

Any java fags here?
I'm a retarded faggot who doesn't know shit in java.

Other urls found in this thread:

stackoverflow.com/help/how-to-ask
twitter.com/NSFWRedditVideo

Did you even try it yet?

>Java
Kill yourself.

In C++ :
string myString;
myString = String2+String1+String2;
Return myString;
In java, maybe it's the same thing, i dont know

Try what the C++ faggot did.

Lower case r in return

Yep sorry, auto caps

Literally just put:

return string2 + string1 + string2;

This

No need to assign a variable to it

I code whatever is in demand. I've coded C#, Java, ECMAScript, JavaScript, BASIC, hell even COBOL. I just learn whatever employers are seeking at that time.

a=input()
b=input()
print(b+a+b)

>programmer here
I wrote this, maybe it could give you some inspiration:

void oddOrEven (int n)
{
if (n == 1) printf("Your number is odd."); if (n == 21) printf("Your number is odd.");
if (n == 2) printf("Your number is even."); if (n == 22) printf("Your number is even.");
if (n == 3) printf("Your number is odd."); if (n == 23) printf("Your number is odd.");
if (n == 4) printf("Your number is even."); if (n == 24) printf("Your number is even.");
if (n == 5) printf("Your number is odd."); if (n == 25) printf("Your number is odd.");
if (n == 6) printf("Your number is even."); if (n == 26) printf("Your number is even.");
if (n == 7) printf("Your number is odd."); if (n == 27) printf("Your number is odd.");
if (n == 8) printf("Your number is even."); if (n == 28) printf("Your number is even.");
if (n == 9) printf("Your number is odd."); if (n == 29) printf("Your number is odd.");
if (n == 10) printf("Your number is even."); if (n == 30) printf("Your number is even.");
if (n == 11) printf("Your number is odd."); if (n == 31) printf("Your number is odd.");
if (n == 12) printf("Your number is even."); if (n == 32) printf("Your number is even.");
if (n == 13) printf("Your number is odd."); if (n == 33) printf("Your number is odd.");
if (n == 14) printf("Your number is even."); if (n == 34) printf("Your number is even.");
if (n == 15) printf("Your number is odd."); if (n == 35) printf("Your number is odd.");
if (n == 16) printf("Your number is even."); if (n == 36) printf("Your number is even.");
if (n == 17) printf("Your number is odd."); if (n == 37) printf("Your number is odd.");
if (n == 18) printf("Your number is even."); if (n == 38) printf("Your number is even.");
if (n == 19) printf("Your number is odd."); if (n == 39) printf("Your number is odd.");
if (n == 20) printf("Your number is even."); if (n == 40) printf("Your number is even.");
}

...you know it's only going to get harder from here, right?

if (n % 2 == 1)
io.out(n ++ " is odd.")
else
io.out(n ++ " is even.")

Where you fucking drunk when you wrote your shit?

Funny.
So many things wrong, I assume this is calculated for irritation.

checked

maybe he's using the kiddie builder

oddOrEven(0);
oddOrEven(41);
oddOrEven(floatbitstoint(M_PI));

What? I don't even want to count percentages or whatever that is.

No, I was just a beginner. I've advanced a lot since then and I have worked on my code for several years.
Now it can do numbers up to 8 thousand and I am planning to make it to 8,500 by the end of the year.

What have you tried? also did you read the general Stack Overflow posting rules? stackoverflow.com/help/how-to-ask

Hey, if you're going to take the post seriously,
then take the function seriously.

bool isOdd( int n )
{
return( n%2 == 1 );
}

a function that merely prints out to stdout isn't really useful. This kind of function is usable in the grander scope.

It's possible to do it faster
in C:
printf("%d is %s.\n", n, ((n & 1)? "odd":"even"));
or
if (n & 1) printf("%d is odd.\n", n);
else printf("%d is even.\n", n);
Don't use mod for powers of 2

Why do so many of you fags know java

...

Pick up a book on discrete mathematics, the % is the modulus operator. It gets the remainder.

The function he gave does IO, you are simply returning a truth value. Your function is essentially different is concept. If he had written one with a return of a Boolean I would have done something like that, but he did not, notice his printf.

Don't use mod with powers of 2.
int isOdd(int n) {
return n & 1;
}

kek'd
printf("%d" is", n);
printf(n%2?"even":"odd");

kek overflow

>Don't use mod for powers of 2

IMO you should let the optimizing compiler handle optimization.

The programmer should focus on writing clear, documented code.

I work in a software business that uses lots of bitwise operations like & and | for register operations.
We interview lots of programmers and give them white board tests.
Most programmers have forgotten bitwise operations after school,
so using mod is more clear to the larger audience.

The generated assembly is exactly the same either way? Sort of confused why not to use mod with powers of 2, if bit arithmetic is not any faster as if you look at the generated assembly, it is 100% the same.

This.

return(string2 + string1 + string2);