Rahul
Years of experience : Fresher
Location : Bangalore
Key skills :.Net, C, C++, Java, Networking, oracle, Mobile technology etc.
|
|
ASP.NET: Caching
What is caching?
Caching is the technique of storing frequently used items in memory so that they can be accessed more quickly. By caching the response, the request is served from the response already stored in memory. It’s important to choose the items to cache wisely as Caching incurs overhead. A Web form that is frequently used and does not contain data that frequently changes is good for caching. A cached web form freezes form’s server-side content and changes to that content do not appear until the cache is refreshed.
|
ASP.NET Passport authentication
Describe how Passport authentication works.
ASP.NET application with Passport authentication implemented checks the user’s machine for a current passport authentication cookie. If it is not available, ASP.NET directs the user to a Passport sign-on page. The Passport service authenticates the user, stores an authentication cookie on the user’s computer and direct the user to the requested page.
|
Static in java
Explain static in java.
# A static variable is attached with the class as a whole and not with specific instances of a class. # Each object shares a common copy of the static variables which means there is only one copy per class, no matter how many objects are created from it. # Static variables are declared with the static keyword in a class. # Static variables are always called by the class name. # It is created when the program starts and gets destroyed when the programs stops. # Static methods are implicitly final, because overriding is done based on the type of the object # Static methods are attached to a class, not an object. # A static method in a superclass can be shadowed by another static method in a subclass, as long as the original method was not declared final. # You can’t override a static method with a non-static method which means you can’t change a static method into an instance method in a subclass. # Non-static variables has unique values with each object instance.
|
Java string objects
Two String objects with same values not to be equal under the == operator. Explain How.
The == operator compares references and not contents. It compares two objects and if they are the same object in memory and present in the same memory location, the expression returns true else it returns false. It is quite possible that two same contents are located in different memory locations. Following function will help to understand the concept: public class Test { public static void main(String[] args) { String str1 = “abc”; String str2 = str1; String str5 = “abc”; String str3 = new String(”abc”); String str4 = new String(”abc”); System.out.println(”== comparison - ” + (str1 == str2)); System.out.println(”equals method - ” + str1.equals(str2)); System.out.println(”== comparison - ” + str3 == str4); System.out.println(”equals method - ” + str3.equals(str4)); System.out.println(”== comparison - ” + (str1 == str5)); } } Output == comparison - true equals method - true == comparison - false equals method - true == comparison - true
|
1 |
|