CasiOo's Profile User Rating: *****

Reputation: 1510 Grandmaster
Active Posts:
3,375 (2.05 per day)
05-April 11
Profile Views:
Last Active:
User is offline Today, 09:43 AM

Previous Fields

OS Preference:
Who Cares
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Who Cares
Dream Kudos:
Expert In:

Latest Visitors

Icon   CasiOo has not set their status

Posts I've Made

  1. In Topic: Appending integers to a string !

    Posted 3 Oct 2015

    Java evaluates expressions from left to right
    Precedence matters. Some operators will be evaluated before others
    + for integer division and String concatenation just happen to have the same precedence

    System.out.println(1 + 1 + " test " + 1 + 1);



    2 test 11

    Here's how Java evaluates it in steps
    1 + 1 + " test " + 1 + 1
    2 + " test " + 1 + 1
    "2 test " + 1 + 1
    "2 test 1" + 1
    "2 test 11"
  2. In Topic: Constructors calling each other. Which "direction" is the best

    Posted 3 Oct 2015

    Flaw: Constructor does Real Work

    With that out of the way, I agree with what have already been said add complexity only when it's needed

    Calling a constructor with null values makes it harder to read. Example:
    new Person(name, null, age, null); // What do these null values mean?
    new Person(name, address, age, gender); // Ah, okay!

    The same goes for constructor chaining, where you are passing null values around

    Often you can get around having multiple constructors. In your case, you should be using Optional
    class Person{
      String name;
      Optional<Address> address;
      Person(String name, Optional<Address> address){ = name;
         this.address= address;
  3. In Topic: Calculation Using Switch Case Method (Begginer)

    Posted 24 Sep 2015

    This actually is a fun and tricky one
    The bug is in your println, which behaves in a weird way for what you're trying to do

    Chars are basically just ints in disguise, and you're even able to use them as ints
    You are able to add a char to an int:
    char foo = '+';
    int num = 5;
    int result = foo + num;

    So you have this fun little line (extremely hard to spot at first), where you are adding all of the chars and integers together
    Notice how the = symbol isn't even being printet
    num1 + operator + num2 + '=' + result

    Solution, use printf to format your output:
    System.out.printf("%.2f%s%.2f=%.2f", num1, operator, num2, result);
  4. In Topic: Best way to make a post request and get the JSON response.

    Posted 14 Sep 2015

    You should set the Accept header to Accept: application/json that way you get better error messages, otherwise they are throwing html at you

    Next, you need to supply the X-Application header, which is your AppKey

    It can all be found here

    Don't follow the redirect, as it is redirecting you to an error html page :)
  5. In Topic: Day of the Week Program, Previous Day Output Wrong

    Posted 7 Sep 2015

    Works as expected :)
    What confuses you?



    **Test Day**

    Set day: Sunday
    Next day: Monday
    Previous day: Sunday // Remember that our day is previously set to Monday, so prev day should be Sunday
    After 4 days: Thursday

My Information

Member Title:
D.I.C Lover
Age Unknown
Birthday Unknown
Years Programming:
Programming Languages:
Java, C#, VB.NET, JavaScript, PL/SQL, PHP (Basic)

Contact Information



Page 1 of 1
  1. Photo

    riperator Icon

    31 Jul 2013 - 10:33
    <3 you
  2. Photo

    b.netana Icon

    23 Mar 2013 - 17:32
  3. Photo

    b.netana Icon

    23 Mar 2013 - 17:32
    wanted to that you for your help with my gui practice
  4. Photo

    raghav.naganathan Icon

    25 Nov 2012 - 21:15
    Hi dude...I would like to tell you that your rep(729) is a perfect cube :) Cheers :)
  5. Photo

    ubunta Icon

    30 Sep 2012 - 23:33
    hi hello
    hope will be fine and feeling well!!!!!!!!!!!!!!
  6. Photo

    Proshnobodhok Icon

    12 Oct 2011 - 12:31
    Hi CasiOo,
    I really didnt know the term. nyways seems like you can help me in at least telling me the way to get the related resources. but is it against the IT laws?
  7. Photo

    CasiOo Icon

    28 Jun 2011 - 04:11
    Thank you :)
  8. Photo

    smohd Icon

    26 Jun 2011 - 19:39
    Welcome to contributors group
Page 1 of 1