Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: would this expression be true or false??

  1. #1
    Member
    Join Date
    Oct 2010
    Posts
    39
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default would this expression be true or false??

    (!(5>3) && 1<2) ?


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,355
    Thanks
    182
    Thanked 833 Times in 776 Posts
    Blog Entries
    5

    Default Re: would this expression be true or false??

    Try it and see:
    class FalseTest{
        public static void main(String[] args){
            System.out.println(!(5>3) && 1<2);
       }
    }

  3. The Following User Says Thank You to copeg For This Useful Post:

    JavaPF (October 25th, 2010)

Similar Threads

  1. Replies: 4
    Last Post: April 27th, 2010, 02:18 AM
  2. Does this still hold true?
    By April in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: February 2nd, 2010, 09:28 AM
  3. Help creating expression tree
    By nellaf in forum Java SE APIs
    Replies: 1
    Last Post: December 3rd, 2009, 08:54 AM
  4. Creating an Expression Tree
    By vluong in forum Collections and Generics
    Replies: 0
    Last Post: November 28th, 2009, 11:41 PM
  5. why is this statement evaluating false??
    By humdinger in forum Object Oriented Programming
    Replies: 2
    Last Post: November 3rd, 2009, 04:28 PM