Skip to main content

Privado.com - A Private Search Engine

https://www.privado.com/ Your searches should be private. We make sure they really are.  Private Search in Action  We don’t track you  We don’t store your searches in any identifiable way  We don’t store your IP address in our services Your privacy is important.  There are no traces of your activities and personal identity in our servers.  You can learn more about privacy in our blog  We don't like cookies!   https://www.privado.com/

Java J2EE Interview Questions and Answers - Part 2

  1. What is Garbage Collection and how to call it explicitly?- When an object is no longer referred to by any variable, java automatically reclaims memory used by that object. This is known as garbage collection. System. gc() method may be used to call it explicitly.
  2. What is finalize() method?- finalize () method is used just before an object is destroyed and can be called just prior to garbage collection.
  3. What are Transient and Volatile Modifiers?- Transient: The transient modifier applies to variables only and it is not stored as part of its object’s Persistent state. Transient variables are not serialized. Volatile: Volatile modifier applies to variables only and it tells the compiler that the variable modified by volatile can be changed unexpectedly by other parts of the program.
  1. What is method overloading and method overriding?- Method overloading: When a method in a class having the same method name with different arguments is said to be method overloading. Method overriding : When a method in a class having the same method name with same arguments is said to be method overriding.
  2. What is difference between overloading and overriding?- a) In overloading, there is a relationship between methods available in the same class whereas in overriding, there is relationship between a superclass method and subclass method. b) Overloading does not block inheritance from the superclass whereas overriding blocks inheritance from the superclass. c) In overloading, separate methods share the same name whereas in overriding, subclass method replaces the superclass. d) Overloading must have different method signatures whereas overriding must have same signature.
  3. What is meant by Inheritance and what are its advantages?- Inheritance is the process of inheriting all the features from a class. The advantages of inheritance are reusability of code and accessibility of variables and methods of the super class by subclasses.
  1. What is the difference between this() and super()?- this() can be used to invoke a constructor of the same class whereas super() can be used to invoke a super class constructor.
  2. What is the difference between superclass and subclass?- A super class is a class that is inherited whereas sub class is a class that does the inheriting.
  3. What modifiers may be used with top-level class?- public, abstract and final can be used for top-level class.
  1. What are inner class and anonymous class?- Inner class : classes defined in other classes, including those defined in methods are called inner classes. An inner class can have any accessibility including private. Anonymous class : Anonymous class is a class defined inside a method without a name and is instantiated and declared in the same place and cannot have explicit constructors.
  2. What is a package?- A package is a collection of classes and interfaces that provides a high-level layer of access protection and name space management.
  3. What is a reflection package?- java. lang. reflect package has the ability to analyze itself in runtime.
  1. What is interface and its use?- Interface is similar to a class which may contain method’s signature only but not bodies and it is a formal set of method and constant declarations that must be defined by the class that implements it. Interfaces are useful for: a)Declaring methods that one or more classes are expected to implement b)Capturing similarities between unrelated classes without forcing a class relationship. c)Determining an object’s programming interface without revealing the actual body of the class.
  2. What is an abstract class?- An abstract class is a class designed with implementation gaps for subclasses to fill in and is deliberately incomplete.
  3. What is the difference between Integer and int?- a) Integer is a class defined in the java. lang package, whereas int is a primitive data type defined in the Java language itself. Java does not automatically convert from one to the other. b) Integer can be used as an argument for a method that requires an object, whereas int can be used for calculations.

Comments

Popular Posts

DOT NET Interview Questions with Answers

When not to use Design Patterns? Do not use design patterns in any of the following situations. • When the software being designed would not change with time. • When the requirements of the source code of the application are unique. If any of the above applies in the current software design, there is no need to apply design patterns in the current design and increase unnecessary complexity in the design. When to use Design Patterns? Design Patterns are particularly useful in one of the following scenarios. • When the software application would change in due course of time. • When the application contains source code that involves object creation and event notification. Benefits of Design Patterns: The following are some of the major advantages of using Design Patterns in software development. • Flexibility • Adaptability to change • Reusability What are Design Patterns? A Design Pattern essentially consists of a problem in a software design and a solutio

Probationary/ Specialist Officers in Indian Bank

Probationary/ Specialist Officers Location :  Across India Eligibility: BE/ B.Tech (Che/ Electrical/ Mech/ Prdn/ Textile/ ETE/ ECE/ CS/ IT)/ MCA/ MBA www.freshersworld.com Details:     Indian Bank (A Govt of India Undertaking) Recruitment of Probationary Officers/ Specialist Officers (Industrial Development Officers/ Computer Officers) Indian Bank, a leading Public Sector Bank, with headquarters in Chennai having geographical presence all over India and abroad invites online applications from Indian Citizens for the following posts. Post Code Post Scale Total Vacancy Age as on 01.07.09 Min Max 1 Probationary Officers I 118 21 30 Specialist Officers         Industrial Development Officers in the following Engineering disciplines         2 Chemical I 02 21 30 3 Electrical I 02 21 30 4 Electronics I 02 21 30 5 Leather Technology I 02 21 30 6 Mechanical I 02 21 30 7 Production/ Metallurgy I 02

DesignEvo - A free and easy online logo designer

DesignEvo is  easy-to-use online logo design tool with millions of icons, 100+ stylish  fonts, 3,000+ practical logo templates and handy editing tools. It can help  people easily create appealing and effective logos for their brands,  websites, blogs, social media channels, etc.  It is really awesome and intuitive interface. Easy to design and customize. A person can easily design by selecting a pre-defined logo design and modify it on the fly. Hardly you need 1 minute to design your new logo with minor modifications. Its really awesome site. I suggest you to try it out.   You can discover more about DesignEvo here: https://www.designevo.com Learn more about Designevo  @ YouTube designevo, free logo design, logo maker, create a logo, easy logo maker, design logo free, free logo, logo designs, logo images

Free Softwares 09 July 09

JDownloader JDownloader, open source and platform independent, can help download files from file hosters like Rapidshare.com, Megaupload.com and others. JDownloader can be used by both kinds of users - those who have a premium account and those who don't pay. Features: Support for many file hosting sites, decrypt plug-ins for many services. e.g. sj.org, UCMS, WordPress, skips the limits of Filehosting websites, downloads in multiple paralell streams, download with multiple connections, captcha recognition, automatical file extraction, Can download Youtube, Vimeo, clipfish video, and Mp3 files; 24-hour support, integrates with Firefox, no installation needed, and more. The 15.6 MB JDownloader, v.0.6.193, cross-platform - works on Windows, Linux and Mac OS X, can be downloaded at http://jdownloader.en.softonic.com/download Runs on Java 1.5 or higher. jGnash jGnash is a free personal finance manager with many features available in commercial versions. Main Features

Mobile Number Portability in India by Sept 20

Department of Telecom has issued ( .pdf ) a notification stating that long awaited number portability will finally be available by September 20. The main object of number portability is to be able to retain the same number even after switching between different mobile service providers.   Mobile Number Portability gives a mobile subscriber the leverage of retaining his/her mobile phone number even after switching between networks. As per Department of Telecom - Mobile Number Portability is to be implemented in Delhi, Mumbai, Maharashtra and Gujarat Service areas of Zone I and Zone 2 includes Kolkata, Tamil Nadu, Chennai, Andhra and Karnataka of within six months of award of license by September 20, 2009, and in the rest of the country by March 20, 2010. Syniverse Technologies have been licensed for MNP operations in Zone I while MNP Interconnection got licensed for MNP operations in Zone 2.   TRAI will decide all kinds of mobile number portability tariffs like the transaction

Contact Form

Name

Email *

Message *