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 3 of 3

Thread: I don't know what's wrong...

  1. #1
    Junior Member
    Join Date
    Mar 2014
    Posts
    11
    My Mood
    Amazed
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Question I don't know what's wrong...

    package java;

    public class Practice_1 {
    public static void main(String[] args) {
    String a = new String("Wow");
    String b = "Wow";
    String c = a;
    String d = c;

    boolean b1 = a == b;
    boolean b2 = b.equals(b + "!");
    boolean b3 = !c.equals(a);

    if (b1 && b2 || b3) {
    System.out.println("Success!");
    else{
    System.out.println("Success");
    }
    }
    }
    }




    I didn't know how to put code in the box format so I just copied and pasted..., but please do help and please tell me how to put in the box format. Thx! -_-


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    4,740
    My Mood
    Mellow
    Thanks
    172
    Thanked 622 Times in 609 Posts

    Default Re: I don't know what's wrong...

    Thanks for trying, and welcome to the forum! You'll find the answer if you read this topic which includes that and other useful info for new members. When you edit your post, let us know what help you need with your code; ask specific questions.

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

    Paulus (March 4th, 2014)

  4. #3
    Junior Member
    Join Date
    Mar 2014
    Posts
    11
    My Mood
    Amazed
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: I don't know what's wrong...

    Thx for the link and help! I'll try to change the format if I can.

Similar Threads

  1. I don't even know whats wrong.
    By Gugubo in forum What's Wrong With My Code?
    Replies: 6
    Last Post: August 22nd, 2013, 08:20 PM
  2. I don't understand what's wrong in my programme
    By si3012 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 16th, 2013, 07:58 AM
  3. Using eclipse JRE 6.0 don't know what's wrong
    By ehren101 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: January 20th, 2012, 05:12 AM
  4. [SOLVED] I don't know what's wrong
    By Shivam24 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: July 25th, 2011, 08:54 AM
  5. don't know what's wrong
    By james in forum What's Wrong With My Code?
    Replies: 4
    Last Post: February 15th, 2010, 06:37 PM

Tags for this Thread