Results 1 to 2 of 2
  1. #1
    therealyacek is offline Member
    Join Date
    Oct 2012
    Posts
    8
    Rep Power
    0

    Default if else statement?

    what's better, this:
    Java Code:
    if(head == null)
    	return null;
    else
    	return head.data;
    or
    Java Code:
    if(head == null)
    	return null;
    return head.data;

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: if else statement?

    I doubt it makes much difference.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 2
    Last Post: 03-26-2012, 04:27 PM
  2. Mod and If Statement
    By Valerie1067 in forum New To Java
    Replies: 8
    Last Post: 03-25-2012, 08:00 AM
  3. Replies: 2
    Last Post: 02-15-2011, 05:51 AM
  4. If statement, please help??
    By soc86 in forum New To Java
    Replies: 5
    Last Post: 11-23-2008, 02:58 PM
  5. Statement or Prepared Statement ?
    By paty in forum JDBC
    Replies: 3
    Last Post: 08-01-2007, 04:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •