jThread
Skip to content
  • Home
  • About us
  • Courses
  • Blog
  • Testimonials
  • Contact us

Month: September 2017

Shallow vs Deep comparison of objects

Posted on September 9, 2017September 9, 2017 by SAJU PAPPACHEN

Mary : “Which car you own?” Lucy : “I have FIAT 500X” Mary : “Hey…we have same car. I too have FIAT 500X”   You must have heard about comparing two objects in Java using == and equals() method. What is the difference ? Or what is the difference between deep and shallow comparison ? Read more about Shallow vs Deep comparison of objects[…]

Posted in blog 24 Comments

Decorator Design Pattern

Posted on September 8, 2017September 14, 2017 by SAJU PAPPACHEN

Henry went to the restaurant and ordered one chicken biriyani. After 5 minutes the waiter brought the biriyani. Once when started eating Henry noticed that there is an egg in the biriyani along with two chicken pieces. Thinking that the waiter would have put that egg by mistake Henry called him and told, “I ordered Read more about Decorator Design Pattern[…]

Posted in blog 25 Comments

Scope of variables in Java

Posted on September 7, 2017September 7, 2017 by SAJU PAPPACHEN

void doStuff() {       for (int i = 0; i < 4; i++) {            boolean flag = false;            if (i == 3) { flag = true; } } System.out.println(flag); } I’m sure the compiler will do this : Compiler will say that I have no memory Read more about Scope of variables in Java[…]

Posted in blog 26 Comments

ClassCastException

Posted on September 6, 2017September 6, 2017 by SAJU PAPPACHEN

Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. — Official statement. A guaranteed ClassCastException 😀     ClassCastException is a runtime exception belongs to java.lang package.   Object in = 10; String s = (String)in;   The above code compiles but Read more about ClassCastException[…]

Posted in blog 11 Comments

Posts navigation

Archives

  • July 2021
  • June 2021
  • June 2018
  • October 2017
  • September 2017
  • April 2017

Meta

  • Log in
jThread IT Training & Consultancy, Lenin Nagar, Nandavanam, Palayam, Thiruvananthapuram, Kerala 695034, India
info@jthread.com
9496530286
9448011237
  • Go to Facebook
  • Go to Twitter
  • Go to Linkedin
jThread designed by Vipin Mohan