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: Help me find the right answers

  1. #1
    Junior Member
    Join Date
    Jan 2021
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help me find the right answers

    Hey !

    I am doing a test and i need some help with the following questions:

    1. What is JUnit testing?
    a) A way of writing the code.
    b) A guideline with best practices.
    c) A programming language used with Java.
    d) A framework used for testing.

    The right answer should be d?


    2. How to assert that 2 arrays are equals?
    a) assertTrue(a==b);
    b) assertArrayEquals(array1, array2);
    c) assertTrue(a!=b);
    d) assertTrue(a===b);

    The right answer should be ...?

    3. What will be a result of including following line that uses assertThat static method from AssertJ library in unit test: assertThat("SDA".equalsIgnoreCase("sda")).isTrue() ;
    a) It can be true or false depending on the operating system.
    b) Syntax is not correct.
    c) Assertion is always true, test will pass (if there are no other assertions or exceptions).
    d) Assertion will fail.

    The right answer should be ...?

    Kind regards,

    Squish

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Help me find the right answers

    What do you think the right answers should be?
    Have you done any research online for the answers?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Jan 2021
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Help me find the right answers

    Quote Originally Posted by Norm View Post
    What do you think the right answers should be?
    Have you done any research online for the answers?
    I think they should be:

    1. d
    2. a
    3. c

    Didnt want to post my answers though but i think its that.

    Squish

Similar Threads

  1. Need some answers for Java applet
    By Mattias in forum Java Theory & Questions
    Replies: 1
    Last Post: October 10th, 2014, 05:12 AM
  2. Guys please Help me find answers on A and B below
    By vukosi in forum What's Wrong With My Code?
    Replies: 7
    Last Post: May 6th, 2013, 01:41 PM
  3. Multiple answers to a question
    By jps in forum Totally Off Topic
    Replies: 0
    Last Post: October 6th, 2012, 01:43 PM
  4. Yes or No answers,
    By tyb97 in forum What's Wrong With My Code?
    Replies: 9
    Last Post: September 18th, 2011, 05:57 PM
  5. Is My answers correct??
    By Java.Coder() in forum What's Wrong With My Code?
    Replies: 6
    Last Post: December 28th, 2010, 06:22 AM