khax Posted April 14, 2009 Report Share Posted April 14, 2009 khax is officially going to prom muahahaha. Quote Link to comment Share on other sites More sharing options...
Chilled man Posted April 15, 2009 Report Share Posted April 15, 2009 what with your hand ? Quote Link to comment Share on other sites More sharing options...
Fudge_Brownie Posted April 15, 2009 Report Share Posted April 15, 2009 Alright I wrote a process synchronization program for a homework assignment like a week ago in Java. Then I ran it and found it didnt work. I pondered for like the whole week why it didn't work. My roomate finally does the assignment, and his works fine. I look over his code, and it is almost identical. Until I see...... that he used '&&' in an if statement and I used '^'. I changed to && and my code magically worked. Both compile and run fine, but apparently the ^ does not mean AND in Java? WTF? I doubt most of you get whats up, but any software guys know why? Quote Link to comment Share on other sites More sharing options...
'93 Dave Posted April 15, 2009 Report Share Posted April 15, 2009 Alright I wrote a process synchronization program for a homework assignment like a week ago in Java. Then I ran it and found it didnt work. I pondered for like the whole week why it didn't work. My roomate finally does the assignment, and his works fine. I look over his code, and it is almost identical. Until I see...... that he used '&&' in an if statement and I used '^'. I changed to && and my code magically worked. Both compile and run fine, but apparently the ^ does not mean AND in Java? WTF? I doubt most of you get whats up, but any software guys know why?glad i only had to take c++ Quote Link to comment Share on other sites More sharing options...
V-Speed Posted April 15, 2009 Report Share Posted April 15, 2009 Haha.here's a better shotThats great... i love that pic Quote Link to comment Share on other sites More sharing options...
Black Betty Posted April 15, 2009 Report Share Posted April 15, 2009 khax is officially going to prom muahahaha.I feel sorry for you Quote Link to comment Share on other sites More sharing options...
Young Burnsy Posted April 15, 2009 Report Share Posted April 15, 2009 Alright I wrote a process synchronization program for a homework assignment like a week ago in Java. Then I ran it and found it didnt work. I pondered for like the whole week why it didn't work. My roomate finally does the assignment, and his works fine. I look over his code, and it is almost identical. Until I see...... that he used '&&' in an if statement and I used '^'. I changed to && and my code magically worked. Both compile and run fine, but apparently the ^ does not mean AND in Java? WTF? I doubt most of you get whats up, but any software guys know why?As you know I don't have any experience in Java. I haven't seen anyone use a '^' in C yet but I did a little research and heres what I came up with some truth tables. Check it out.// create truth table for && (conditional AND) operator System.out.printf( "%s\n%s: %b\n%s: %b\n%s: %b\n%s: %b\n\n", "Conditional AND (&&)", "false && false", ( false && false ), "false && true", ( false && true ), "true && false", ( true && false ), "true && true", ( true && true ) ); // create truth table for ^ (boolean logical exclusive OR) operator System.out.printf( "%s\n%s: %b\n%s: %b\n%s: %b\n%s: %b\n\n", "Boolean logical exclusive OR (^)", "false ^ false", ( false ^ false ), "false ^ true", ( false ^ true ), "true ^ false", ( true ^ false ), "true ^ true", ( true ^ true ) );Conditional AND (&&)false && false: falsefalse && true: falsetrue && false: falsetrue && true: trueBoolean logical exclusive OR (^)false ^ false: falsefalse ^ true: truetrue ^ false: truetrue ^ true: falsehttp://www.java2s.com/Tutorial/Java/0060__...orsinaction.htmSo, ^ is an OR operand and && is an AND operand. Quote Link to comment Share on other sites More sharing options...
Black Betty Posted April 15, 2009 Report Share Posted April 15, 2009 Dave, Remember when you posted you accidently broke a guys nose at work? I think you left out some details Today, I was running down the hallway when a door opens and hits me right on the face. I'm sitting there with my nose bleeding and a huge bump forming on my head. The guy who comes out is hugely fat, tries to help me up, trips, and falls on me. I accidentally groped his moobs while trying to push him off. FMLhttp://www.fmylife.com/miscellaneous/964759 Quote Link to comment Share on other sites More sharing options...
7 VII 7 Posted April 15, 2009 Report Share Posted April 15, 2009 hahaha 1 Quote Link to comment Share on other sites More sharing options...
Fudge_Brownie Posted April 15, 2009 Report Share Posted April 15, 2009 So, ^ is an OR operand and && is an AND operand.What the fuck Everything I have ever done and ever seen, '^' means AND. And in Java, if I remember right, the '|' means OR. Quote Link to comment Share on other sites More sharing options...
(n)A-GAME Posted April 15, 2009 Report Share Posted April 15, 2009 Did anyone expect it NOT to happen?Fifth Fast and the Furious a near-certainty Quote Link to comment Share on other sites More sharing options...
'93 Dave Posted April 15, 2009 Report Share Posted April 15, 2009 Quote Link to comment Share on other sites More sharing options...
Serge Posted April 15, 2009 Report Share Posted April 15, 2009 What the fuck Everything I have ever done and ever seen, '^' means AND. And in Java, if I remember right, the '|' means OR.| is always OR, atleast in any C-like language. Quote Link to comment Share on other sites More sharing options...
jnderr Posted April 15, 2009 Report Share Posted April 15, 2009 What the fuck Everything I have ever done and ever seen, '^' means AND. And in Java, if I remember right, the '|' means OR.I don't think they are going to change it for you, better embrace it Been doing PHP and its always used && switched over to Java for my new job so no issues there. Quote Link to comment Share on other sites More sharing options...
Black Betty Posted April 16, 2009 Report Share Posted April 16, 2009 Coolest I phone coverwww.toxel.com/tech/2009/04/05/10-unique-and-creative-apple-iphone-cases/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.