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: Value of expression

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Value of expression

    Hi all, I am new to Java and the operands are numerous.
    And different from what I have learned in VBA.
    would like to know the value of expression.

    // your code goes here
    public static void main(String[] args)
    {
    3++4<<^-8
    }

    // your code goes here
    public static void main(String[] args)
    {
    "abc"&123||8<<2
    }

    // your code goes here
    public static void main(String[] args)
    {
    36>>2*4&&48<<8/4+2
    }

    // your code goes here
    public static void main(String[] args)
    {
    2*4&&0<2||4%2
    }

    Pointing out of my error is much appreciated! Thanks!


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Value of expression

    Put the expressions in a System.out.println(<Expressionhere>); statement to see their values.

    If you get compiler errors, please copy and paste here the full text of the error messages.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Regular expression handling
    By marquiseoflight in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 9th, 2012, 04:57 PM
  2. Regular Expression help
    By medoos in forum Java SE APIs
    Replies: 0
    Last Post: March 19th, 2011, 07:23 PM
  3. would this expression be true or false??
    By robertsbd in forum Java Theory & Questions
    Replies: 1
    Last Post: October 24th, 2010, 10:00 PM
  4. Help creating expression tree
    By nellaf in forum Java SE APIs
    Replies: 1
    Last Post: December 3rd, 2009, 08:54 AM
  5. Creating an Expression Tree
    By vluong in forum Collections and Generics
    Replies: 0
    Last Post: November 28th, 2009, 11:41 PM

Tags for this Thread