Skip to main content

Posts

Showing posts from January, 2018

AngularJs/javascript and Angular/typescript (version 2/4/latest) have a series of difference.

                         AngularJs vs Angular (Typescript)                                                 On basis of process of compilation          ANGULARJS : Angular Js  compiler  traverses the DOM looking for attributes . It takes two phase for compilation where initial phase  traverse the DOM and collect all of the directives. The result is a linking function.   Next  phase evolves combine the directives with a scope and produce a live view. Any changes in the scope model are reflected in the view, and any user interactions with the view are reflected in the scope model. This makes the scope model the single source of truth.

Difference between String ,StringBuffer & StringBuilder?

Run this simple java program and create scenerio of String object creation in your mind.You will see huge difference than expectation.                                I would recommend to first try on your own then follow the solution . As you execute the above line of codes in your Java Runtime Environment .As compiler read the lines .In  case of                                      String a= new String("Hello");        As it will allow compiler to create a new string object .It is always mandatory for  compiler to allocate a memory space in heap whenever new  keyword is used.So String class object created successfully in heap with reference variable a.And a very important point  need to be noted down that here  "new String("Hello');"   It will make a literal object in String  pool with value "Hello".So total number of object created equals two.so if you print value of a using System.out.println(a);  It will print