Top 25 Ruby On Rails Interview Questions

Well this time we have tried to bring you some fresh content on ROR (Ruby On Rails). ROR has gained a lot of fame and reputation in recent time and is considered to be one of the most efficient programming language of modern times.
You need to be well-prepared for any interview and no amount of preparation is considered to be enough, so it is always better to keep adding as much knowledge as you can and prepare as good as you can before actually appearing in the interview. ROR being the most modern language there are mostly not enough resources available on internet to help candidate prepare for an interview and hence we have decided to take this topic for this post.
Following objective and subjective interview questions on ruby on rails are based upon basic introduction of Rails web application framework, components of rails, action controller, action view, action dispatch, RESTful architecture, scaffolding, helpers, filters, sessions and cookies etc. Lets have a look on following basic ruby on rails interview questions and answers.
1. Explain what is Rails?
A. Rails is a extremely productive web-application framework written in Ruby language by David Hansson.
B. Rails are an open source Ruby framework for developing database-backend web applications.
B. Rails include everything needed to create a database-driven web application using the Model-View-Controller (MVC) pattern.
2. Why Ruby on Rails?
There are lot of advantages of using ruby on rails.
A. DRY Principal( Don’t Repeat Yourself): It is a principle of software development aimed at reducing repetition of code. “Every piece of code must have a single, unambiguous representation within a system”
B. Convention over Configuration: Most web development framework for .NET or Java force you to write pages of configuration code. If you follow suggested naming conventions, Rails doesn’t need much configuration.
C.  Gems and Plugins: RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing ruby programs and library.
Plugins: A Rails plugin is either an extension or a modification of the core framework. It provides a way for developers to share bleeding-edge ideas without hurting the stable code base. We need to decide if our plugin will be potentially shared across different Rails applications.
D. Scaffolding: Scaffolding is a meta-programming method of building database-backend software application. It is a technique supported by MVC frameworks, in which programmer may write a specification, that describes how the application database may be used. There are two type of scaffolding:
-static: Static scaffolding takes 2 parameter i.e your controller name and model name.
-dynamic: In dynamic scaffolding you have to define controller and model one by one.
E. Rack Support: Rake is a software task management tool. It allows you to specify tasks and describe dependencies as well as to group tasks in a namespace.
F. Metaprogramming: Metaprogramming techniques use programs to write programs.
G. Bundler: Bundler is a new concept introduced in Rails 3, which helps you to manage your gems for application. After specifying gem file, you need to do a bundle install.
H. Rest Support.
I. Action Mailer
3. Define the various components of Rail?
A. Action Pack: Action Pack is a single gem that contains Action Controller, Action View and Action Dispatch. The “VC” part of “MVC”.
Action Controller: Action Controller is the component that manages the controllers in a Rails application. The Action Controller framework processes incoming requests to a Rails application, extracts parameters, and dispatches them to the intended action.

Services provided by Action Controller include session management, template rendering, and redirect management.

Action View:  Action View manages the views of your Rails application. It can create both HTML and XML output by default.
Action View manages rendering templates, including nested and partial templates, and includes built-in AJAX support.
Action Dispatch: Action Dispatch handles routing of web requests and dispatches them as you want, either to your application or any other Rack application. Rack applications are a more advanced topic and are covered in a separate guide called Rails on Rack.
B. Action Mailer: Action Mailer is a framework for building e-mail services. You can use Action Mailer to receive and process incoming email and send simple plain text or complex multipart emails based on flexible templates.
C. Active Model: Active Model provides a defined interface between the Action Pack gem services and Object Relationship Mapping gems such as Active Record. Active Model allows Rails to utilize other ORM frameworks in place of Active Record if your application needs this.
D. Active Record: Active Record are like Object Relational Mapping (ORM), where classes are mapped to table, objects are mapped to columns and object attributes are mapped to data in the table.
F. Active Resource: Active Resource provides a framework for managing the connection between business objects and RESTful web services. It implements a way to map web-based resources to local objects with CRUD semantics.
G. Active Support: Active Support is an extensive collection of utility classes and standard Ruby library extensions that are used in Rails, both by the core code and by your applications.
4. Explain about RESTful Architecture.
RESTful: REST stands for Representational State Transfer. REST is an architecture for designing both web applications and application programming interfaces (API’s), that’s uses HTTP.
RESTful interface means clean URLs, less code, CRUD interface. CRUD means Create-READ-UPDATE-DESTROY. In REST, they add 2 new verbs, i.e, PUT, DELETE.
5. What is ORM in Rails?
ORM tends for Object-Relationship-Model, where Classes are mapped to table in the database, and Objects are directly mapped to the rows in the table.
6. How many Types of Associations Relationships does a Model have?
When you have more than one model in your rails application, you would need to create connection between those models. You can do this via associations. Active Record supports three types of associations:
one-to-one: A one-to-one relationship exists when one item has exactly one of another item. For example, a person has exactly one birthday or a dog has exactly one owner.
one-to-many: A one-to-many relationship exists when a single object can be a member of many other objects. For instance, one subject can have many books.
many-to-many: A many-to-many relationship exists when the first object is related to one or more of a second object, and the second object is related to one or many of the first object.
You indicate these associations by adding declarations to your models: has_one, has_many, belongs_to, and has_and_belongs_to_many.
7. What do you mean by render and redirect_to?
render causes rails to generate a response whose content is provided by rendering one of your templates. Means, it will direct goes to view page.
redirect_to generates a response that, instead of delivering content to the browser, just tells it to request another url. Means it first checks actions in controller and then goes to view page.
8. What are Filters?
Filters are methods that run “before”, “after” or “around” a controller action. Filters are inherited, so if you set a filter on ApplicationController, it will be run on every controller in your application.
9. What is MVC? and how it Works?
MVC tends for Model-View-Controller, used by many languages like PHP, Perl, Python etc. The flow goes like this:
Request first comes to the controller, controller finds and appropriate view and interacts with model, model interacts with your database and send the response to controller then controller based on the response give the output parameter to view.
10. What are helpers and how to use helpers in ROR?
Helpers are modules that provide methods which are automatically usable in your view. They provide shortcuts to commonly used display code and a way for you to keep the programming out of your views. The purpose of a helper is to simplify the view.
11. What is request.xhr?
A request.xhr tells the controller that the new Ajax request has come, It always return Boolean values (TRUE or FALSE)
12. What things we can define in the model?
There are lot of things you can define in models few are:
1. Validations (like validates_presence_of, numeracility_of, format_of etc.)
2. Relationships (like has_one, has_many, HABTM etc.)
3. Callbacks (like before_save, after_save, before_create etc.)
4. Suppose you installed a plugin say validation_group, So you can also define validation_group settings in your model
5. ROR Queries in Sql
6. Active record Associations Relationship
13.  How many types of callbacks available in ROR?
 (1) before_validation
(2) before_validation_on_create
(3) validate_on_create
(4) after_validation
(5) after_validation_on_create
(6) before_save
(7) before_create
(8) after_create
(9) after_save
14. What is Session and Cookies?
Session is used to store user information on the server side. Maximum size is 4 kb. Cookies are used to store information on the browser side or we can say client side.
15. How to use two databases into a single application?
magic multi-connections allows you to write your model once, and use them for the multiple rails databases at the same time.
sudo gem install magic_multi_connection. After installing this gem, just add this line at bottom of your environment.rb require “magic_multi_connection”
16. What are the various changes between the Rails Version 2 and 3?
1. Introduction of bundler (new way to manage your gem dependencies)
2. Gemfile and Gemfile.lock (where all your gem dependencies lies, instead of environment.rb)
3. HTML5 support
17. How to serialize data with YAML?
YAML is a straight forward machine parsable data serialization format, designed for human readability and interaction with scripting language such as Perl and Python.
YAML is optimized for data serialization, formatted dumping, configuration files, log files, internet messaging and filtering.
18. What are the servers supported by ruby on rails?
RoR was generally preferred over WEBrick server at the time of writing, but it can also be run by:
Lighttpd (pronounced ‘lighty’) is an open-source web server more optimized for speed-critical environments.
Abyss Web Server- is a compact web server available for windows, Mac osX and Linux operating system.
Apache and nginx
19. How many types of callbacks available in ROR?
Sol. * (-) save
* (-) valid
* (1) before_validation
* (2) before_validation_on_create
* (-) validate
* (-) validate_on_create
* (3) after_validation
* (4) after_validation_on_create
* (5) before_save
* (6) before_create
* (-) create
* (7) after_create
* (8) after_save
20. How you run your Rails application without creating databases?
You can run your application by uncommenting the line in environment.rb
path=> rootpath conf/environment.rb
config.frameworks- = [action_web_service, :action_mailer, :active_record
21. What is TDD and BDD?
TDD stands for Test-Driven-Development and BDD stands for Behavior-Driven-Development.
22. How to use sql db or mysql db without defining it in the database.yml?
You can use ActiveRecord anywhere
require “rubygems”
require “active_record”
:adapter=> ‘postgresql’, :user=>’foo’, :password=> ‘abc’, :database=>’whatever’})
23. What is the log that has to seen to check for an error in ruby rails?
Rails will report errors from Apache in log/apache.log and errors from the ruby code in log/development.log. If you having a problem, do have a look at what these log are saying.
24. What do you mean by Naming Convention in Rails.
Variables: Variables are named where all letters are lowercase and words are separated by underscores. E.g: total, order_amount.
Class and Module: Classes and modules uses MixedCase and have no underscores, each word starts with a uppercase letter. Eg: InvoiceItem
Database Table: Table name have all lowercase letters and underscores between words, also all table names to be plural. Eg: invoice_items, orders etc
Model: The model is named using the class naming convention of unbroken MixedCase and always the singular of the table name.
For eg: table name is might be orders, the model name would be Order. Rails will then look for the class definition in a file called order.rb in /app/model directory. If the model class name has multiple capitalized words, the table name is assumed to have underscores between these words.
Controller: controller  class names are pluralized, such that OrdersController would be the controller class for the orders table. Rails will then look for the class definition in a file called orders_controlles.rb in the /app/controller directory.
25. GET and POST Method?
GET is basically for just getting (retrieving) data, whereas POST may involve anything, like storing or updating data, or ordering a product, or sending E-mail.
Have a Happy Interviewing!!!

Top 50 Android Interview Questions

1) What is Android, explain in simple words?

It is an open-sourced operating system that is used primarily on mobile devices, such as cell phones and tablets. It is a Linux kernel-based system that’s been equipped with rich components that allows developers to create and run apps that can perform both basic and advanced functions.

2) What does Google Android SDK means?

The Google Android SDK is a toolset that developers need in order to write apps on Android enabled devices. It contains a graphical interface that emulates an Android driven handheld environment, allowing them to test and debug their codes.

3) What is the importance of Android in the mobile market?

Developers can write and register apps that will specifically run under the Android environment. This means that every mobile device that is Android enabled will be able to support and run these apps. With the growing popularity of Android mobile devices, developers can take advantage of this trend by creating and uploading their apps on the Android Market for distribution to anyone who wants to download it.

4) What language is supported by Android for application development?

The main language supported is Java programming language. Java is the most popular language for app development, which makes it ideal even for new Android developers to quickly learn to create and deploy applications in the Android environment.

5) What is the Android Framework.

The Android Framework is an important aspect of the Android Architecture. Here you can find all the classes and methods that developers would need in order to write applications on the Android environment.

6) Explain the Android Architecture?

Android Architecture is made up of 4 key components:
- Linux Kernel
- Libraries
- Android Framework
- Android Applications

7) What is the benefit of having an emulator within the Android environment?

The emulator lets developers “play” around an interface that acts as if it were an actual mobile device. They can write and test codes, and even debug. Emulators are a safe place for testing codes especially if it is in the early design phase.

8) What is AAPT?

AAPT is short for Android Asset Packaging Tool. This tool provides developers with the ability to deal with zip-compatible archives, which includes creating, extracting as well as viewing its contents.

9) What is activityCreator and what is the use of an activityCreator?

An activityCreator is the first step towards the creation of a new Android project. It is made up of a shell script that will be used to create new file system structure necessary for writing codes within the Android IDE.

10) What are Intents?

Intents displays notification messages to the user from within the Android enabled device. It can be used to alert the user of a particular state that occurred. Users can be made to respond to intents.

11) What is Orientation?

Orientation, which can be set using setOrientation(), dictates if the LinearLayout is represented as a row or as a column. Values are set as either HORIZONTAL or VERTICAL.

12) What are containers?

Containers, as the name itself implies, holds objects and widgets together, depending on which specific items are needed and in what particular arrangement that is wanted. Containers may hold labels, fields, buttons, or even child containers, as examples.

13) Explain Activities.

Activities are what you refer to as the window to a user interface. Just as you create windows in order to display output or to ask for an input in the form of dialog boxes, activities play the same role, though it may not always be in the form of a user interface.

14) Differentiate between Activities and Services.

Activities can be closed, or terminated anytime the user wishes. On the other hand, services are designed to run behind the scenes, and can act independently. Most services run continuously, regardless of whether there are certain or no activities being executed.

15) What is adb?

Adb is short for Android Debug Bridge. It allows developers the power to execute remote shell commands. Its basic function is to allow and control communication towards and from the emulator port.

16) What is the importance of XML-based layouts?

The use of XML-based layouts provides a consistent and somewhat standard means of setting GUI definition format. In common practice, layout details are placed in XML files while other items are placed in source files.

17) What are the most important items in every Android project?

These are the essential items that are present each time an Android project is created:
- AndroidManifest.xml
- build.xml
- bin/
- src/
- res/
- assets/

18) What are the limitations or distadvantages of Android?

Given that Android is an open-source platform, and the fact that different Android operating systems have been released on different mobile devices, there’s no clear cut policy to how applications can adapt with various OS versions and upgrades. One app that runs on this particular version of Android OS may or may not run on another version. Another disadvantage is that since mobile devices such as phones and tabs come in different sizes and forms, it poses a challenge for developers to create apps that can adjust correctly to the right screen size and other varying features and specs.

19) What is ANR?

ANR is short for Application Not Responding. This is actually a dialog that appears to the user whenever an application have been unresponsive for a long period of time.

20) What is the AndroidManifest.xml?

This file is essential in every application. It is declared in the root directory and contains information about the application that the Android system must know before the codes can be executed.

21) What are the four states of an activity?

- Active – if the activity is at the foreground
- Paused – if the activity is at the background and still visible
- Stopped – if the activity is not visible and therefore is hidden or obscured by another activity
- Destroyed – when the activity process is killed or completed terminated

22) When does the onStop() method is invoked?

A call to onStop method happens when an activity is no longer visible to the user, either because another activity has taken over or if in front of that activity.

23) What are the different states wherein a process is based?

There are 4 possible states:
- foreground activity
- visible activity
- background activity
- empty process

24) What is a Sticky Intent?

A Sticky Intent is a broadcast from sendStickyBroadcast() method such that the intent floats around even after the broadcast, allowing others to collect data from it.

25) What is the importance of settings permissions in app development?

Permissions allow certain restrictions to be imposed primarily to protect data and code. Without these, codes could be compromised, resulting to defects in functionality.

26) How are escape characters used as attribute?

Escape characters are preceded by double backslashes. For example, a newline character is created using ‘\\n’

27) What role does Dalvik play in Android development?

Dalvik serves as a virtual machine, and it is where every Android application runs. Through Dalvik, a device is able to execute multiple virtual machines efficiently through better memory management.

28) Enumerate the three key loops when monitoring an activity

- Entire lifetime – activity happens between onCreate and onDestroy
- Visible lifetime – activity happens between onStart and onStop
- Foreground lifetime – activity happens between onResume and onPause

29) Enumerate the steps in creating a bounded service through AIDL.

1. create the .aidl file, which defines the programming interface
2. implement the interface, which involves extending the inner abstract Stub class as well as implanting its methods.
3. expose the interface, which involves implementing the service to the clients.

30) Is there a case wherein other qualifiers in multiple resources take precedence over locale?

Yes, there are actually instances wherein some qualifiers can take precedence over locale. There are two known exceptions, which are the MCC (mobile country code) and MNC (mobile network code) qualifiers.

31) What is the function of an intent filter?

Because every component needs to indicate which intents they can respond to, intent filters are used to filter out intents that these components are willing to receive. One or more intent filters are possible, depending on the services and activities that is going to make use of it.

32) What is the importance of Default Resources?

When default resources, which contain default strings and files, are not present, an error will occur and the app will not run. Resources are placed in specially named subdirectories under the project res/ directory.

33) How can the ANR be prevented?

One technique that prevents the Android system from concluding a code that has been responsive for a long period of time is to create a child thread. Within the child thread, most of the actual workings of the codes can be placed, so that the main thread runs with minimal periods of unresponsive times.

34) What is the proper way of setting up an Android-powered device for app development?

The following are steps to be followed prior to actual application development in an Android-powered device:
-Declare your application as “debuggable” in your Android Manifest.
-Turn on “USB Debugging” on your device.
-Set up your system to detect your device.

35) When dealing with multiple resources, which one takes precedence?

Assuming that all of these multiple resources are able to match the configuration of a device, the ‘locale’ qualifier almost always takes the highest precedence over the others.

36) What data types are supported by AIDL?

AIDL has support for the following data types:
-all native Java data types like int,long, char and Boolean

37) When does ANR occur?

The ANR dialog is displayed to the user based on two possible conditions. One is when there is no response to an input event within 5 seconds, and the other is when a broadcast receiver is not done executing within 10 seconds.

38) What is a visible activity?

A visible activity is one that sits behind a foreground dialog. It is actually visible to the user, but not necessarily being in the foreground itself.

39) How do you remove icons and widgets from the main screen of the Android device?

To remove an icon or shortcut, press and hold that icon. You then drag it downwards to the lower part of the screen where a remove button appears.

40) What is AIDL?

AIDL, or Android Interface Definition Language, handles the interface requirements between a client and a service so both can communicate at the same level through interprocess communication or IPC. This process involves breaking down objects into primitives that Android can understand. This part is required simply because a process cannot access the memory of the other process.

41) What is a Fragment?

A fragment is a part or portion of an activity. It is modular in a sense that you can move around or combine with other fragments in a single activity. Fragments are also reusable.

42) Is it possible to use or add a fragment without using a user interface?

Yes, it is possible to do that, such as when you want to create a background behavior for a particular activity. You can do this by using add(Fragment,string) method to add a fragment from the activity.

43) What are the core components under the Android application architecture?

There are 5 key components under the Android application architecture:
- services
- intent
- resource externalization
- notifications
- content providers

44) When is the best time to kill a foreground activity?

The foreground activity, being the most important among the other states, is only killed or terminated as a last resort, especially if it is already consuming too much memory. When a memory paging state has been reach by a foreground activity, then it is killed so that the user interface can retain its responsiveness to the user.

45) What composes a typical Android application project?

A project under Android development, upon compilation, becomes an .apk file. This apk file format is actually made up of the AndroidManifest.xml file, application code, resource files, and other related files.

46) What is portable wi-fi hotspot?

Portable Wi-Fi Hotspot allows you to share your mobile internet connection to other wireless device. For example, using your Android-powered phone as a Wi-Fi Hotspot, you can use your laptop to connect to the Internet using that access point.

47) What is an action?

In Android development, an action is what the intent sender wants to do or expected to get as a response. Most application functionality is based on the intended action.

48) Do all mobile phones support the latest Android operating system?

Some Android-powered phone allows you to upgrade to the higher Android operating system version. However, not all upgrades would allow you to get the latest version. It depends largely on the capability and specs of the phone, whether it can support the newer features available under the latest Android version.

49) What is the difference between a regular bitmap and a nine-patch image?

In general, a Nine-patch image allows resizing that can be used as background or other image size requirements for the target device. The Nine-patch refers to the way you can resize the image: 4 corners that are unscaled, 4 edges that are scaled in 1 axis, and the middle one that can be scaled into both axes.

50) Which elements can occur only once and must be present?

Among the different elements, the and elements must be present and can occur only once. The rest are optional, and can occur as many times as needed.


A) Describe the APK format.

The (Android Packaging Key) APK file is compressed format of the AndroidManifest.xml file, application code (.dex files), resource files, and other files. A project is compiled into a single .apk file.

B) What are the different phases of the Activity life cycle?

As an activity transitions from state to state, it is notified of the change by calls to the following protected methods:
1) void onCreate(Bundle savedInstanceState)
2) void onStart()
3) void onRestart()
4) void onResume()
5) void onPause()
6) void onStop()
7) void onDestroy()
Taken together, these seven methods define the entire lifecycle of an activity.

Android Activity Cucle

Android Activity Cucle

protected void onCreate(Bundle savedInstanceState):

This method is called when this activity is initially created. It provides a place to create views, bind data to lists, and perform other operations whose results must exist until onDestroy() is called. Also, this method is called with an android.os.Bundle instance that contains this activity’s previously saved state, if this state was saved. Otherwise, null is passed. Finally, onCreate() is always followed by onStart().

protected void onStart():

This method is called when this activity is becoming visible to the user. Also, onStart() is followed by onResume() if this activity is coming to the foreground, or onStop() if this activity is becoming hidden .

protected void onResume():

This method is called when this activity can start to interact with the user — this activity is now at the top of the activity stack and receives focus. Also, onResume() is always followed by onPause().

protected void onPause():

This method is called when the OS is about to resume a previous activity. The onPause() method is typically used to commit unsaved changes to persistent storage, and stop animations and other time-consuming processor activities. This method should run quickly because the next activity cannot be resumed until onPause() returns. Finally, onPause() is followed by onResume() if this activity is returning to the foreground, or onStop() if this activity is becoming hidden.

protected void onRestart():

This method is called after this activity has been stopped and prior to it being restarted. Also, onRestart() is always followed by onStart().

protected void onDestroy():

This method is called when this activity is being terminated. After this method returns, the process hosting this activity is killed by the OS

C) What is the significance of the .dex files??

Android programs are compiled into .dex (Dalvik Executable) files, which are in turn zipped into a single .apk file on the device. .dex files can be created by automatically, translating compiled applications written in the Java programming language.

D) What are the different tools in Android? Explain them?

The Android SDK and Virtual Device Manager:

It is used to create and manage Android Virtual Devices (AVD) and SDK packages. The AVD hosts an emulator running a particular build of Android, letting you specify the supported SDK version, screen resolution, amount of SD card storage available, and available hardware capabilities (such as touchscreens and GPS).

The Android Emulator:

An implementation of the Android virtual machine designed to run within a virtual device on your development computer. Use the emulator to test and debug your Android applications.

Dalvik Debug Monitoring Service (DDMS) :

Use the DDMS perspective to monitor and control the Dalvik virtual machines on which you’re debugging your applications.

Android Asset Packaging Tool (AAPT) :

Constructs the distributable Android package files (.apk).

Android Debug Bridge,(adb) :

Android Debug Bridge, is a command-line debugging application shipped with the SDK. It provides tools to browse the device, copy tools on the device, and forward ports for debugging.
E) What is the Open Handset Alliance?

The OHA is a consortium of 84 technology and mobile companies that have joined hands to accelerate innovation in mobile technology and at the same time offer the end users a better, cost-effective and richer mobile experience. Members of this include Google, HTC, Sony, Dell, Intel, Motorola, Qualcomm, Texas Instruments, Samsung, LG, T-Mobile, Nvidia. The OHA was started on 5 November 2007 by Google and 34 other companies. Android is the main software of the alliance.

50 most frequently asked OOP interview questions

oopOkay so this time we are coming up with some more technical stuffs. All of you, who have attempted or are willing to go for a technical interview for software job, will know that Object Oriented Programming (OOP) concepts are the basics on which everything else is built upon. Any company would expect you to have a very clear understanding of the OOPS concepts. Here we would like to help you attempt such OOP interview questions with more confident and perfection.

Have a successful Interview!

1. Define OOPS?

Ans. OOPS is abbreviated as Object Oriented Programming system in which programs are considered as a collection of objects. Each object is nothing but an instance of a class.

2. Write fundamental concepts of OOPS?

Ans. Following are the concepts of OOPS and are as follows:.


3. What is a class?

Ans. Class is a collection of the object, and it has common structure and behavior.

4. Explain an abstraction?

Ans. Abstraction is a good feature of OOPS , and it shows only the necessary details to the client of an object. Means, it shows only necessary details for an object, not the inner details of an object. Example – When you want to switch On television, it not necessary to show all the functions of TV. Whatever is required to switch on TV will be showed by using abstract class.

5. Define abstract class?

Ans. An abstract class is a class which cannot be instantiated. Creation of an object is not possible with abstract class , but it can be inherited. An abstract class can contain only Abstract method.

6. What is an object?

Ans. Object is termed as an instance of a class, and it has its own state, behavior and identity.

7. What is the difference between class and an object?

Ans. An object is an instance of a class. Objects hold any information , but classes don’t have any information. Definition of properties and functions can be done at class and can be used by the object.

Class can have sub-classes, and an object doesn’t have sub-objects.

8. What is Inheritance?

Ans. Inheritance is a concept where one class shares the structure and behavior defined in another class. If inheritance applied on one class is called Single Inheritance, and if it depends on multiple classes, then it is called multiple Inheritance.

9. What is Polymorphism?

Ans. Polymorphism is nothing but assigning behavior or value in a subclass to something that was already declared in the main class. Simply, polymorphism takes more than one form.

10. What are manipulators?

Ans. Manipulators are the functions which can be used in conjunction with the insertion (<<) and extraction (>>) operators on an object. Examples are endl and setw.

11. Explain Encapsulation?

Ans. Encapsulation is an attribute of an object, and it contains all data which is hidden. That hidden data can be restricted to the members of that class.

Levels are Public, Protected, Private, Internal and Protected Internal.

12. Can a static method use non static members?

Ans. False.

13. Explain base class, sub class and super class?

Ans. Base class is the most generalized class , and it is said to be a root class.

Sub class is a class that inherits from one or more base classes.

Super class is the parent class from which another class inherits.

14. Explain virtual function in simple words?

Ans. Virtual function is a member function of class and its functionality can be overridden in its derived class. This function can be implemented by using a keyword called virtual, and it can be given during function declaration.

Virtual function can be achieved in C++, and it can be achieved in C Language by using function pointers or pointers to function.

15. Explain Inline function?

Ans. Inline function is a technique used by the compilers and instructs to insert complete body of the function wherever that function is used in the program source code.

16. What are different types of arguments?

Ans. A parameter is a variable used during the declaration of the function or subroutine and arguments are passed to the function , and it should match with the parameter defined. There are two types of Arguments.

Call by Value – Value passed will get modified only inside the function , and it returns the same value whatever it is passed it into the function.
Call by Reference – Value passed will get modified in both inside and outside the functions and it returns the same or different value.

17. Explain interface?

Ans. An interface is a collection of abstract method. If the class implements an inheritance, and then thereby inherits all the abstract methods of an interface.

18. What is constructor?

Ans. Constructor is a method used to initialize the state of an object, and it gets invoked at the time of object creation. Rules for constructor are:.

Constructor Name should be same as class name.
Constructor must have no return type.

19. What is Destructor?

Ans. Destructor is a method which is automatically called when the object is made of scope or destroyed. Destructor name is also same as class name but with the tilde symbol before the name.

20. Can we call the base method without creating an instance? If yes, explain how?

Ans. Yes, it is possible to call the base method without creating an instance. And that method should be,.

Static method.

Doing inheritance from that class.-Use Base Keyword from derived class.

21. Explain friend function?

Ans. Friend function is a friend of a class that is allowed to access to Public, private or protected data in that same class. If the function is defined outside the class cannot access such information.

Friend can be declared anywhere in the class declaration, and it cannot be affected by access control keywords like private, public or protected.

22. What is operator overloading?

Ans. Operator overloading is a function where different operators are applied and depends on the arguments. Operator,-,* can be used to pass through the function , and it has their own precedence to execute.


class complex {
double real, imag;

complex(double r, double i) :
real(r), imag(i) {}

complex operator+(complex x, complex y);
complex operator*(complex x, complex y);
complex& operator=(complex x, complex y);

x=1.2, y=6

23. Explain types of constructors?

Ans. There are three various types of constructors , and they are as follows:.

- Default Constructor – With no parameters.

- Parametric Constructor – With Parameters. Create a new instance of a class and also passing arguments simultaneously.

- Copy Constructor – Which creates a new object as a copy of an existing object.

24. Do we require parameter for constructors?

Ans. No, we do not require parameter for constructors.

25. What is a copy constructor?

Ans. This is a special constructor for creating a new object as a copy of an existing object. There will be always only on copy constructor that can be either defined by the user or the system.

26. Explain function overloading?

Ans. Function overloading is defined as a normal function, but it has the ability to perform different tasks. It allows creation of several methods with the same name which differ from each other by type of input and output of the function.
void add(int& a, int& b);
void add(double& a, double& b);
void add(struct bob& a, struct bob& b);

27. What are access modifiers?

Ans. Access modifiers determine the scope of the method or variables that can be accessed from other various objects or classes. There are 5 types of access modifiers , and they are as follows:.

Protected Friend.

28. What is super keyword?

Ans. Super keyword is used to invoke overridden method which overrides one of its superclass methods. This keyword allows to access overridden methods and also to access hidden members of the superclass.

It also forwards a call from a constructor to a constructor in the superclass.

29. Explain ternary operator?

Ans. Ternary operator is said to be an operator which takes three arguments. Arguments and results are of different data types , and it is depends on the function. Ternary operator is also called as conditional operator.

30. What is method overriding?

Ans. Method overriding is a feature that allows sub class to provide implementation of a method that is already defined in the main class. This will overrides the implementation in the superclass by providing the same method name, same parameter and same return type.

31. What is the difference between overloading and overriding?

Ans. Overloading is static binding whereas Overriding is dynamic binding. Overloading is nothing but the same method with different arguments , and it may or may not return the same value in the same class itself.

Overriding is the same method names with same arguments and return types associates with the class and its child class.

32. List and explain operators that cannot be overloaded?

Ans. Following are the operators that cannot be overloaded -.

Scope Resolution (:: )
Member Selection (.)
Member selection through a pointer to function (.*)

33. What is the default access modifier in a class?

The default access modifier of a class is Private by default.

34. When and how can we use finalize method?

Ans. Finalize method helps to perform cleanup operations on the resources which are not currently used. Finalize method is protected , and it is accessible only through this class or by a derived class.

35. What is exception handling?

Ans. Exception is an event that occurs during the execution of a program. Exceptions can be of any type – Run time exception, Error exceptions. Those exceptions are handled properly through exception handling mechanism like try, catch and throw keywords.

36. What is ‘this’ pointer?

Ans. THIS pointer refers to the current object of a class. THIS keyword is used as a pointer which differentiates between the current object with the global object. Basically, it refers to the current object.

37. What are tokens?

Ans. Token is recognized by a compiler and it cannot be broken down into component elements. Keywords, identifiers, constants, string literals and operators are examples of tokens.

Even punctuation characters are also considered as tokens – Brackets, Commas, Braces and Parentheses.

38. What is sealed modifiers?

Ans. Sealed modifiers are the access modifiers where it cannot be inherited by the methods. Sealed modifiers can also be applied to properties, events and methods. This modifier cannot be applied to static members.

39. Difference between new and override?

Ans. The new modifier instructs the compiler to use the new implementation instead of the base class function. Whereas, Override modifier helps to override the base class function.

40. Explain early and late binding?

Ans. Early binding refers to assignment of values to variables during design time whereas late binding refers to assignment of values to variables during run time.

41. Provide difference between structure and a class?

Ans. Structure default access type is public , but class access type is private. A structure is used for grouping data whereas class can be used for grouping data and methods. Structures are exclusively used for data and it doesn’t require strict validation , but classes are used to encapsulates and inherit data which requires strict validation.

42. What is dynamic or run time polymorphism?

Ans. Dynamic or Run time polymorphism is also known as method overriding in which call to an overridden function is resolved during run time, not at the compile time. It means having two or more methods with the same name, same signature but with different implementation.

43. What does the keyword virtual represented in the method definition?

Ans. It means, we can override the method.

44. Which OOPS concept exposes only necessary information to the calling functions?

Ans. Data Hiding / Abstraction

45. Which keyword can be used for overloading?

Ans. Operator keyword is used for overloading.

46. What is the default access specifier in a class definition?

Ans. Private access specifier is used in a class definition.

47. Explain static and dynamic binding?

Ans. Binding is nothing but the association of a name with the class. Static binding is a binding in which name can be associated with the class during compilation time , and it is also called as early Binding.

Dynamic binding is a binding in which name can be associated with the class during execution time , and it is also called as Late Binding.

48. How many number of instances can be created for an abstract class?

Ans. Zero instances will be created for an abstract class.

49. What is pure virtual function?

Ans. A pure virtual function is a function which can be overridden in the derived class but cannot be defined. A virtual function can be declared as Pure by using the operator =0.

Example -.

Virtual void functionA() // Virtual, Not pure

Virtual void functionB() = 0 //Pure virtual

50. Which OOPS concept is used as reuse mechanism?

Ans. Inheritance is the OOPS concept that can be used as reuse mechanism.

Top 101 Core Java Interview Questions

So you are looking for interview questions for core Java? Here we are presenting you top 100 most commonly asked Core Java questions. Please note, we have tried our level best to bring up the most commonly asked technical questions for Core Java, however this should not be the official list as Java is a vast language and there can be a chance of hundreds of different possible questions. We hope this will help you clear the technical round of your interview, at the same time we also suggest to go through as many different sources as you can while preparing for technical interview.

Q1. What are the various access specifiers for Java classes?

Ans: In Java, access specifiers are the keywords used before a class name which defines the access scope. The types of access specifiers for classes are:

  1. Public : Class,Method,Field is accessible from anywhere.
  2. Protected:Method,Field can be accessed from the same class to which they belong or from the sub-classes,and from the class of same package,but not from outside.
  3. Default: Method,Field,class can be accessed only from the same package and not from outside of it’s native package.
  4. Private: Method,Field can be accessed from the same class to which they belong.

Q2. Can we have any other return type than void for main method?

Ans: No, Java class main method can have only void return type for the program to get successfully executed.

Nonetheless , if you absolutely must return a value to at the completion of main method , you can use System.exit(int status)

Q3. How can we make copy of a java object?

Ans: We can use the concept of cloning to create copy of an object. Using clone, we create copies with the actual state of an object.

Clone() is a method of Cloneable interface and hence, Cloneable interface needs to be implemented for making object copies.

Q4. Which types of exceptions are caught at compile time?

Ans: Checked exceptions can be caught at the time of program compilation. Checked exceptions must be handled by using try catch block in the code in order to successfully compile the code.

Q5. What are Loops in Java? What are three types of loops?

Ans: Looping is used in programming to execute a statement or a block of statement repeatedly. There are three types of loops in Java:

Q6. What’s the purpose of Static methods and static variables?

Ans: When there is a requirement to share a method or a variable between multiple objects of a class instead of creating separate copies for each object, we use static keyword to make a method or variable shared for all objects.

Q7. Can a class have multiple constructors?

Ans: Yes, a class can have multiple constructors with different parameters. Which constructor gets used for object creation depends on the arguments passed while creating the objects.

Q8. Can a class in Java be inherited from more than one class?

Ans: In Java, a class can be derived from only one class and not from multiple classes. Multiple inheritances is not supported by Java.

Q9. Is String a data type in java?

Ans: String is not a primitive data type in java. When a string is created in java, it’s actually an object of Java.Lang.String class that gets created. After creation of this string object, all built-in methods of String class can be used on the string object.

Q10. What is a singleton class? Give a practical example of its usage.

Ans: A singleton class in java can have only one instance and hence all its methods and variables belong to just one instance. Singleton class concept is useful for the situations when there is a need to limit the number of objects for a class.

The best example of singleton usage scenario is when there is a limit of having only one connection to a database due to some driver limitations or because of any licensing issues.

Q11. What is the difference between an Inner Class and a Sub-Class?

Ans: An Inner class is a class which is nested within another class. An Inner class has access rights for the class which is nesting it and it can access all variables and methods defined in the outer class.

A sub-class is a class which inherits from another class called super class. Sub-class can access all public and protected methods and fields of its super class.

A) For Loops

For loops are used in java to execute statements repeatedly for a given number of times. For loops are used when number of times to execute the statements is known to programmer.

B) While Loops

While loop is used when certain statements need to be executed repeatedly until a condition is fulfilled. In while loops, condition is checked first before execution of statements.

C) Do While Loops

Do While Loop is same as While loop with only difference that condition is checked after execution of block of statements. Hence in case of do while loop, statements are executed at least once.

Q12. Can we cast any other type to Boolean Type with type casting?

Ans: No, we can neither cast any other primitive type to Boolean data type nor can cast Boolean data type to any other primitive data type.

Q13: What is an infinite Loop? How infinite loop is declared?

Ans: An infinite loop runs without any condition and runs infinitely. An infinite loop can be broken by defining any breaking logic in the body of the statement blocks.

Infinite loop is declared as follows:


For (;;)


// Statements to execute

// Add any loop breaking logic



Q14. Can main() method in Java can return any data?

Ans: In java, main() method can’t return any data and hence, it’s always declared with a void return type.

Q15. What is data encapsulation and what’s its significance?

Ans: Encapsulation is a concept in Object Oriented Programming for combining properties and methods in a single unit.

Encapsulation helps programmers to follow a modular approach for software development as each object has its own set of methods and variables and serves its functions independent of other objects. Encapsulation also serves data hiding purpose.

Q16. What is Final Keyword in Java? Give an example.

Ans: In java, a constant is declared using the keyword Final. Value can be assigned only once and after assignment, value of a constant can’t be changed.

In below example, a constant with the name const_val is declared and assigned avalue:

Private Final int const_val=100

When a method is declared as final,it can NOT be overridden by the subclasses.This method are faster than any other method,because they are resolved at complied time.

When a class is declares as final,it cannot be subclassed. Example String,Integer and other wrapper classes.

Q17. What is the difference between continue and break statement?

Ans: break and continue are two important keywords used in Loops. When a break keyword is used in a loop, loop is broken instantly while when continue keyword is used, current iteration is broken and loop continues with next iteration.

In below example, Loop is broken when counter reaches 4.


For (counter=0;counter

If (counter==4) {




In the below example when counter reaches 4, loop jumps to next iteration and any statements after the continue keyword are skipped for current iteration.


For (counter=0;counter

If (counter==4) {



System.outprintln(“This will not get printed when counter is 4″);



Q18. Which API is provided by Java for operations on set of objects?

Ans: Java provides a Collection API which provides many useful methods which can be applied on a set of objects. Some of the important classes provided by Collection API include ArrayList, HashMap, TreeSet and TreeMap.

Q19. What is ternary operator? Give an example.

Ans: Ternary operator , also called conditional operator is used to decide which value to assign to a variable based on a Boolean value evaluation. It’s denoted as ?

In the below example, if rank is 1, status is assigned a value of “Done” else “Pending”.

public class conditionTest {
public static void main(string args[]) {
String status;
int rank;
status= (rank == 1) ? “Done”: “Pending”;


Q20. How can we pass argument to a function by reference instead of pass by value?

Ans: In java, we can pass argument to a function only by value and not by reference.

Q21. What’s the base class in Java from which all classes are derived?

Ans: java.lang.object

Q22. What are Java Packages? What’s the significance of packages?

Ans: In Java, package is a collection of classes and interfaces which are bundled together as they are related to each other. Use of packages helps developers to modularize the code and group the code for proper re-use. Once code has been packaged in Packages, it can be imported in other classes and used.

Q23. Does Importing a package imports its sub-packages as well in Java?

Ans: In java, when a package is imported, its sub-packages aren’t imported and developer needs to import them separately if required.

For example, if a developer imports a package university.*, all classes in the package named university are loaded but no classes from the sub-package are loaded. To load the classes from its sub-package ( say department), developer has to import it explicitly as follows:

Import university.department.*

Q24. Can we declare a class as Abstract without having any abstract method?

Ans: Yes we can create an abstract class by using abstract keyword before class name even if it doesn’t have any abstract method. However, if a class has even one abstract method, it must be declared as abstract otherwise it will give an error.

Q25. Can we declare the main method of our class as private?

Ans: In java, main method must be public static in order to run any application correctly. If main method is declared as private, developer won’t get any compilation error however, it will not get executed and will give a runtime error.

Q26. Can we call the constructor of a class more than once for an object?

Ans: Constructor is called automatically when we create an object using new keyword. It’s called only once for an object at the time of object creation and hence, we can’t invoke the constructor again for an object after its creation.

Q27. What’s the difference between an Abstract Class and Interface in Java?

Ans: The primary difference between an abstract class and interface is that an interface can only possess declaration of public static methods with no concrete implementation while an abstract class can have members with any access specifiers (public, private etc) with or without concrete implementation.

Another key difference in the use of abstract classes and interfaces is that a class which implements an interface must implement all the methods of the interface while a class which inherits from an abstract class doesn’t require implementation of all the methods of its super class.

A class can implement multiple interfaces but it can extend only one abstract class.

Q28. What is the difference between double and float variables in Java?

Ans: In java, float takes 4 bytes in memory while Double takes 8 bytes in memory. Float is single precision floating point decimal number while Double is double precision decimal number.

Q29. Is there any way to skip Finally block of exception even if some exception occurs in the exception block?

Ans: If an exception is raised in Try block, control passes to catch block if it exists otherwise to finally block. Finally block is always executed when an exception occurs and the only way to avoid execution of any statements in Finally block is by aborting the code forcibly by writing following line of code at the end of try block:




Q30. How an object is serialized in java?

Ans: In java, to convert an object into byte stream by serialization, an interface with the name Serializable is implemented by the class. All objects of a class implementing serializable interface get serialized and their state is saved in byte stream.

Q31. What is default switch case? Give example.

Ans: In a switch statement, default case is executed when no other switch condition matches. Default case is an optional case .
It can be declared only once all other switch cases have been coded.

In the below example, when score is not 1 or 2, default case is used.

public class switchExample {
int score=4;
public static void main(String args[]) {
switch (score) {
case 1:
System.out.println(“Score is 1″);
case 2:
system.out.println(“Score is 2″);
System.out.println(“Default Case”);




Q32. When we should use serialization?

Ans: Serialization is used when data needs to be transmitted over the network. Using serialization, object’s state is saved and converted into byte stream .The byte stream is transferred over the network and the object is re-created at destination.

Q33. What is multi-threading?

Ans: Multi threading is a programming concept to run multiple tasks in a concurrent manner within a single program. Threads share same process stack and running in parallel. It helps in performance improvement of any program.

Q34. What are the performance implications of Interfaces over abstract classes?

Ans: Interfaces are slower in performance as compared to abstract classes as extra indirections are required for interfaces. Another key factor for developers to take into consideration is that any class can extend only one abstract class while a class can implement many interfaces.

Use of interfaces also puts an extra burden on the developers as any time an interface is implemented in a class; developer is forced to implement each and every method of interface.

Q35. When the constructor of a class is invoked?

Ans: The constructor of a class is invoked every time an object is created with new keyword.

For example, in the following class two objects are created using new keyword and hence, constructor is invoked two times.


public class const_example {

const_example() {

System.out.println(“Inside constructor”);


Public static void main(String args[]) {

const_example c1=new const_example();

const_example c2=new const_example();




Q36. What are the two ways of implementing multi-threading in Java?

Ans: Multi threaded applications can be developed in Java by using any of the following two methodologies:

1. By using Java.Lang.Runnable Interface. Classes implement this interface to enable multi threading. There is a Run() method in this interface which is implemented.

2. By writing a class that extend Java.Lang.Thread class.

Q37. Can we override static methods of a class?

Ans: We cannot override static methods. Static methods belong to a class and not to individual objects and are resolved at the time of compilation (not at runtime).Even if we try to override static method,we will not get an complitaion error,nor the impact of overriding when running the code.

Q38. Why Runnable Interface is used in Java?

Ans: Runnable interface is used in java for implementing multi threaded applications. Java.Lang.Runnable interface is implemented by a class to support multi threading.

Q39. In the below example, how many String Objects are created?



String s1=”I am Java Expert”;

String s2=”I am C Expert”;

String s3=”I am Java Expert”;


Ans: In the above example, two objects of Java.Lang.String class are created. s1 and s3 are references to same object.

Q40. Is it compulsory for a Try Block to be followed by a Catch Block in Java for Exception handling?

Ans: Try block needs to be followed by either Catch block or Finally block or both. Any exception thrown from try block needs to be either caught in the catch block or else any specific tasks to be performed before code abortion are put in the Finally block.

Q41. Why Strings in Java are called as Immutable?

Ans: In java, string objects are called immutable as once value has been assigned to a string, it can’t be changed and if changed, a new object is created.

In below example, reference str refers to a string object having value “Value one”.


String str=”Value One”;


When a new value is assigned to it, a new String object gets created and the reference is moved to the new object.


str=”New Value”;


Q42: What are 6 different types of operators in Java?

Ans: In java, operators can be classified in following six types:

Arithmetic Operators

Used for arithmetic calculations. Example are +,-,*,/,%,++,–

Relational Operators

Used for relational comparison. E.g. ==,!=, >,<,<=,>=

Bitwise operators

Used for bit by bit operations. E.g. &,|,^,~

Logical Operators

Used for logical comparisons. E.g. &&,||,!

Assignment Operators

Used for assigning values to variables. E.g. =,+=,-=,*=,/=

Q43. What’s the difference between an array and Vector?

Ans: An array groups data of same primitive type and is static in nature while vectors are dynamic in nature and can hold data of different data types.

Q44. When a lot of changes are required in data, which one should be a preference to be used? String or StringBuffer?

Ans: Since StringBuffers are dynamic in nature and we can change the values of StringBuffer objects unlike String which is immutable, it’s always a good choice to use StringBuffer when data is being changed too much. If we use String in such a case, for every data change a new String object will be created which will be an extra overhead.

Q45. Can a class be a super class and a sub-class at the same time? Give example.

Ans: If there is a hierarchy of inheritance used, a class can be a super class for another class and a sub-class for another one at the same time.

In the example below, continent class is sub-class of world class and it’s super class of country class.


public class world {



public class continenet extends world {



public class country extends continent {




Q46. What’s the purpose of using Break in each case of Switch Statement?

Ans: Break is used after each case (except the last one) in a switch so that code breaks after the valid case and doesn’t flow in the proceeding cases too.

If break isn’t used after each case, all cases after the valid case also get executed resulting in wrong results.

Q47. In the below example, what will be the output?


public class superclass {

public void displayResult() {

System.out.println(“Printing from superclass”);



public class subclass extends superclass {

public void displayResult() {

System.out.println(“Displaying from subClass”);



public static void main(String args[]) {

subclass obj=new subclass();





Ans: Output will be:

Displaying from subclass

Displaying from superclass

Q48. How we can execute any code even before main method?

Ans: If we want to execute any statements before even creation of objects at load time of class, we can use a static block of code in the class. Any statements inside this static block of code will get executed once at the time of loading the class even before creation of objects in the main method.

Q49. In multi-threading how can we ensure that a resource isn’t used by multiple threads simultaneously?

Ans: In multi-threading, access to the resources which are shared among multiple threads can be controlled by using the concept of synchronization. Using synchronized keyword, we can ensure that only one thread can use shared resource at a time and others can get control of the resource only once it has become free from the other one using it.

Q50. There are two classes named classA and classB. Both classes are in the same package. Can a private member of classA can be accessed by an object of classB?

Ans: Private members of a class aren’t accessible outside the scope of that class and any other class even in the same package can’t access them.

Q51. What’s the benefit of using inheritance?

Ans: Key benefit of using inheritance is reusability of code as inheritance enables sub-classes to reuse the code of its super class. Polymorphism (Extensibility ) is another great benefit which allow new functionality to be introduced without effecting existing derived classes.

Q52. What’s the access scope of Protected Access specifier?

Ans: When a method or a variable is declared with Protected access specifier, it becomes accessible in the same class,any other class of the same package as well as a sub-class.
Access Levels Modifier Class Package Subclass World
public Y Y Y Y
protected Y Y Y N
no modifier Y Y N N
private Y N N N

Q53. Can we override a method by using same method name and arguments but different return types?

Ans: The basic condition of method overriding is that method name, arguments as well as return type must he exactly same as is that of the method being overridden. Hence using a different return type doesn’t override a method.

Q54. What’s difference between Stack and Queue?

Ans: Stack and Queue both are used as placeholder for a collection of data. The primary difference between a stack and a queue is that stack is based on Last in First out (LIFO) principle while a queue is based on FIFO (First In First Out) principle.

Q55. What are the two environment variables that must be set in order to run any Java programs?

Ans: Java programs can be executed in a machine only once following two environment variables have been properly set:

PATH variable
CLASSPATH variable

Q56. Describe different states of a thread.

Ans: A thread in Java can be in either of the following states:

Ready: When a thread is created, it’s in Ready state.
Running: A thread currently being executed is in running state.
Waiting: A thread waiting for another thread to free certain resources is in waiting state.
Dead: A thread which has gone dead after execution is in dead state.

Q57. Is the following class declaration correct?



public abstract final class testClass {

// Class methods and variables



Ans: The above class declaration is incorrect as an abstract class can’t be declared as Final.

Q58. Can we use a default constructor of a class even if an explicit constructor is defined?

Ans: Java provides a default no argument constructor if no explicit constructor is defined in a Java class. But if an explicit constructor has been defined, default constructor can’t be invoked and developer can use only those constructors which are defined in the class.

Q59.What will be the output of following piece of code?


public class operatorExample {

public static void main(String args[]) {

int x=4;





Ans: In this case postfix ++ operator is used which first returns the value and then increments. Hence it’s output will be 4.

Q60. Can variables be used in Java without initialization?

Ans: In Java, if a variable is used in a code without prior initialization by a valid value, program doesn’t compile and gives an error as no default value is assigned to variables in Java.

Q61. I want to re-reach and use an object once it has been garbage collected. How it’s possible?

Ans: Once an object has been destroyed by garbage collector, it no longer exists on the heap and it can’t be accessed again. There is no way to reference it again.

Q62. Can a constructor have different name than a Class name in Java?

Ans: Constructor in Java must have same name as the class name and if the name is different, it doesn’t act as a constructor and compiler thinks of it as a normal method.

Q63. How can we use primitive data types as objects?

Ans: Primitive data types like int can be handled as objects by the use of their respective wrapper classes. For example, Integer is a wrapper class for primitive data type int. We can apply different methods to a wrapper class, just like any other object.

Q64. How can we restrict inheritance for a class so that no class can be inherited from it?

Ans: If we want a class not to be extended further by any class, we can use the keyword Final with the class name.

In the following example, Stone class is Final and can’t be extend

</em>public Final Class Stone {

// Class methods and Variables



Q65: Can we use goto in Java to go to a particular line?

Ans: In Java, there is not goto keyword and java doesn’t support this feature of going to a particular labeled line.

Q66. In Java thread programming, which method is a must implementation for all threads?

Ans: Run() is a method of Runnable interface that must be implemented by all threads.

Q67. Can a dead thread be started again?

Ans: In java, a thread which is in dead state can’t be started again. There is no way to restart a dead thread.

Q68. How can we find the actual size of an object on the heap?

Ans: In java, there is no way to find out the exact size of an object on the heap.

Q69. Is JDK required on each machine to run a Java program?

Ans: JDK is development Kit of Java and is required for development only and to run a Java program on a machine, JDK isn’t required. Only JRE is required.

Q70. What’s the difference between comparison done by equals method and == operator?

Ans: In Java, equals() method is used to compare the contents of two string objects and returns true if the two have same value while == operator compares the references of two string objects.

In the following example, equals() returns true as the two string objects have same values. However == operator returns false as both string objects are referencing to different objects:


public class equalsTest {

public static void main(String args[]) {

String srt1=”Hello World”;

String str2=”Hello World”;

If (str1.equals(str2))

{// this condition is true

System.out.println(“str1 and str2 are equal in terms of values”);


If (str1==str2) {

//This condition is not true

System.out.println(“Both strings are referencing same object”);




// This condition is true

System.out.println(“Both strings are referencing different objects”);




Q71. Is it possible to define a method in Java class but provide it’s implementation in the code of another language like C?

Ans: Yes, we can do this by use of native methods. In case of native method based development, we define public static methods in our Java class without its implementation and then implementation is done in another language like C separately.

Q72. What will be the output of Round(3.7) and Ceil(3.7)?

Ans: Round(3.7) returns 3 while Ceil(3.7) returns 4.

Q73. How destructors are defined in Java?

Ans: In Java, there are no destructors defined in the class as there is no need to do so. Java has its own garbage collection mechanism which does the job automatically by destroying the objects when no longer referenced.

Q74. How objects are stored in Java?

Ans: In java, each object when created gets a memory space from a heap. When an object is destroyed by a garbage collector, the space allocated to it from the heap is re-allocated to the heap and becomes available for any new objects.

Q75. Can a variable be local and static at the same time?

Ans: No a variable can’t be static as well as local at the same time. Defining a local variable as static gives compilation error.

Q76. Give an example of use of Pointers in Java class.

Ans: There are no pointers in Java. So we can’t use concept of pointers in Java.

Q77. I want to persist data of objects for later use. What’s the best approach to do so?

Ans: The best way to persist data for future use is to use the concept of serialization.

Q78. Is it correct to say that due to garbage collection feature in Java, a java program never goes out of memory?

Ans: Even though automatic garbage collection is provided by Java, it doesn’t ensure that a Java program will not go out of memory as there is a possibility that creation of Java objects is being done at a faster pace compared to garbage collection resulting in filling of all the available memory resources.

So, garbage collection helps in reducing the chances of a program going out of memory but it doesn’t ensure that.

Q79. I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?

Ans: This can be implemented by use of the concept of synchronization. Database related code can be placed in a method which hs synchronized keyword so that only one thread can access it at a time.

Q80. What’s the default access specifier for variables and methods of a class?

Ans: Default access specifier for variables and method is package protected i.e variables and class is available to any other class but in the same package,not outside the package.

Q81. How can an exception be thrown manually by a programmer?

Ans: In order to throw an exception in a block of code manually, throw keyword is used. Then this exception is caught and handled in the catch block.


public void topMethod(){
}catch(ManualException e){ }

public void excMethod{
String name=null;
if(name == null){
throw (new ManualException(“Exception thrown manually “);


Q82. I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?

Ans: If we declare the constructor of a class as private, it will not be accessible by any other class and hence, no other class will be able to instantiate it and formation of its object will be limited to itself only.

Q83. Can we have static methods in an Interface?

Ans: Static methods can’t be overridden in any class while any methods in an interface are by default abstract and are supposed to be implemented in the classes being implementing the interface. So it makes no sense to have static methods in an interface in Java.

Q84. What happens if an exception is not handled in a program?

Ans: If an exception is not handled in a program using try catch blocks, program gets aborted and no statement executes after the statement which caused exception throwing.

Q85. In java, how we can disallow serialization of variables?

Ans: If we want certain variables of a class not to be serialized, we can use the keyword transient while declaring them. For example, the variable trans_var below is a transient variable and can’t be serialized:


public class transientExample {

private transient trans_var;

// rest of the code



Q86. What is a Local class in Java?

Ans: In Java, if we define a new class inside a particular block, it’s called a local class. Such a class has local scope and isn’t usable outside the block where its defined.

Q87. I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

Ans: If a class has multiple constructors, it’s possible to call one constructor from the body of another one using this().

Q88. In a class implementing an interface, can we change the value of any variable defined in the interface?

Ans: No, we can’t change the value of any variable of an interface in the implementing class as all variables defined in the interface are by default public, static and Final and final variables are like constants which can’t be changed later.

Q89. What’s meant by anonymous class?

Ans: An anonymous class is a class defined without any name in a single line of code using new keyword.

For example, in below code we have defined an anonymous class in one line of code:


public java.util.Enumeration testMethod()


return new java.util.Enumeration()



public boolean hasMoreElements()


// TODO Auto-generated method stub

return false;



public Object nextElement()


// TODO Auto-generated method stub

return null;




Q90. Is there a way to increase the size of an array after its declaration?

Ans: Arrays are static and once we have specified its size, we can’t change it. If we want to use such collections where we may require a change of size ( no of items), we should prefer vector over array.

Q91. How objects of a class are created if no constructor is defined in the class?

Ans: Even if no explicit constructor is defined in a java class, objects get created successfully as a default constructor is implicitly used for object creation. This constructor has no parameters.

Q92. If an application has multiple classes in it, is it okay to have a main method in more than one class?

Ans: If there is main method in more than one classes in a java application, it won’t cause any issue as entry point for any application will be a specific class and code will start from the main method of that particular class only.

Q93. What’s the order of call of constructors in inheritiance?

Ans: In case of inheritance, when a new object of a derived class is created, first the constructor of the super class is invoked and then the constructor of the derived class is invoked.

Q94 String and StringBuffer both represent String objects. Can we compare String and StringBuffer in Java?

Ans: Although String and StringBuffer both represent String objects, we can’t compare them with each other and if we try to compare them, we get an error.

Q95. Can we use different return types for methods when overridden?

Ans: The basic requirement of method overriding in Java is that the overridden method should have same name, and parameters.But a method can be overridden with a different return type as long as the new return type extends the original.

For example , method is returning a reference type.

Class B extends A{

A method(int x){

//original method


B method(int x){

//overridden method



Q96. Can we call a non-static method from inside a static method?

Ans: Non-Static methods are owned by objects of a class and have object level scope and in order to call the non-Static methods from a static block (like from a static main method), an object of the class needs to be created first. Then using object reference, these methods can be invoked.

Q97. How garbage collection is done in Java?

Ans: In java, when an object is not referenced any more, garbage collection takes place and the object is destroyed automatically. For automatic garbage collection java calls either System.gc() method or Runtime.gc() method.

Q98. What’s the base class of all exception classes?

Ans: In Java, Java.Lang.throwable is the super class of all exception classes and all exception classes are derived from this base class.

Q99. Can we have two methods in a class with the same name?

Ans: We can define two methods in a class with the same name but with different number/type of parameters. Which method is to get invoked will depend upon the parameters passed.

For example in the class below we have two print methods with same name but different parameters. Depending upon the parameters, appropriate one will be called:


public class methodExample {

public void print() {

System.out.println(“Print method without parameters.”);


public void print(String name) {

System.out.println(“Print method with paramter”);


public static void main(String args[]) {

methodExample obj1=new methodExample();






Q100. A person says that he compiled a java class successfully without even having a main method in it? Is it possible?

Ans: main method is an entry point of Java class and is required for execution of the program however; a class gets compiled successfully even if it doesn’t have a main method. It can’t be run though.

Q101. Which of the following classes will have more memory allocated?

Class A: Three methods, four variables, no object

Class B: Five methods, three variables, no object

Ans: Memory isn’t allocated before creation of objects. Since for both classes, there are no objects created so no memory is allocated on heap for any class.

Top 30 Interview Tips to win your dream job

Interview Tips

top 30 interview tips

So you are going for an interview and feeling stressed? Please don’t! Go through some of the tips which would increase your chance of winning your dream job.

  1. Be confident and stress free. Do not get tense by the thought of an interview. It will adversely affect your performance. Try to think positive and be optimistic.
  2. Do your homework. Be well informed about the company. Do proper research. You will be able to speak muck more confidently if you have done a proper homework and research. You will feel confident on the topics that are relevant to the position you are applying for.
  3. This of an interview as a continuos process. It is not just a one time event or a one sided process. Its a process to find out if you are the best fit for the position as well as if the company is best suited for you or not. It is a two way collaborative process.
  4. Try to know your interviewer(s) in advance if possible. Try to get as much information as you can about the company, its past records as well as the interviewer’s history, accomplishments  areas of interests, family and social background if possible. This will help you build a quick report with the interviewer and break ice quickly. You will have an edge over the other candidates who might not be well informed and that will increase your chance of winning the job.
  5. Do not get late to reach the interview site. Do proper planning, get clear directions, plan accordingly so that no unwanted surprises can make you late in reaching interview location. Consider various factors like traffic, availability of transportation etc. Try to reach at least 15-20 minutes early, this will give you enough time to settle once you reach there and get aquatinted with the place and people.
  6. Make a well prepared list of questions you would want to ask when given an opportunity during the interview process. Do some homework on this, it will give you a chance to clear out any questions or doubts you may have regarding the job, company or the process. It will help you decide if you should accept the job offer or not.
  7. Create an excellent portfolio of your work. Make it best possible presentable. If you can showcase some of your sample work, it would be great. Organize everything in a manner so that you can present it when given a chance without wasting much of a time and in effective manner. DO NOT TRY TO SHOWCASE something which might be considered as a confidential information of your past employers. This will give a negative raking to you.
  8. Sometimes, companies evaluate a candidate from the moment they enter the premises of the company till they leave it. Be careful about how you behave once you enter the company till you leave it. Even if no one is around, it could be possible that your moments will be obseved by the prospective employer and it will be given some weightage during the final selection of the candidate.
  9. Ask permission while entering the interview room with smile on your face and proper greetings.
  10. Do not use anything which does not belongs to you without taking proper permission. Avoid such situation where you might have to borrow something from the interviewer in order to explain something. e.g. Pen or pencil or a piece of paper. Try to take those things with you if you thin you will require it.
  11. Dress properly. Do not wear non-formal (casual) clothes. If possible try to do some research about the interviewer’s choice and dress-up accordingly. This could increase your chance of getting selected. Women should be extra careful in choosing their clothes, mack-up, perfumes and any other accessories or jewelry. Nothing should be too strong, revealing or in excess. Maintain a very good personal hygiene.
  12. Give proper attention to what interviewers are asking or what instructions you are being given.
  13. Maintain a good eye contact with your intervier. It is actually a form of communication. It could give you a special charm and magical ability to build quick report with interviewer.
  14. Be very careful about Handshake. Sometimes people don’t prefer unwanted handshake, or some cultures do not accept it normally. When you are sure it is not considered adversely, make sure you do a confident handshake. It is very important that you make right amount of tension in your grip and do not make it too tight nor too limp.
  15. Ask for a permission before taking your position on chair or simply wait until you are asked to take the seat.
  16. Be very specific about your answers. Try to give concise and precise answers to the questions unless asked otherwise. Use enough factual data and supporting information as you can in support of your answers. Use official data if possible.
  17. Do not try to be oversmart or do not sound rude or egoistic. Never ever try to get in to an argument with your interviewer.
  18. Be honest. Do not try to make your interviewer a fool. If you don’t know any answer, accept it honestly but never ever try to bluff or give a wrong answer. If you give any false answer by mistake and your interviewer points it out, accept it honestly.
  19. Have a good and confident posture. Your posture should reflect that you are alert and focused. Be aware about your body language and avoid any adverse aspect of it. Don’t clench your fists, or cross your arms against your chest. Do not clutch your objects liek purse or briefcase tightly. Never ever play with any objects in your hands like your cell phone or keys etc.
  20. Try to drive your interview process by giving right kind of information and asking questions. This will turn your interview in to two way communication instead of an interrogation.
  21. Try to get some before-hand information about the culture of the company and interviewer and try to show some special gesture related to that. e.g. When meeting an asian interviewer use proper form of greeting then just handshake. that will help you build a quick report with them.
  22. Never by sarcastic or negative about your ex-employer.
  23. Provide a well thought proper answers to the behavioral questions. These could be instrumental in deciding the right candidate.
  24. Provide proper testimonials of your previous boss or client.
  25. Take proper pause before giving an answer. Never ever commit a mistake of start talking before the interviewer has finished his/her questions.
  26. Tell stories. Stories that demonstrate your ability and strength  How you handle stressful and challenging situations. This is what the interviewers are most interested in many a times.
  27. Mostly it is considered to be a good practice to address the interviewer by his/her name. Specially in the western world. On the other hand, in many asian and middle eastern countries, it is not considered good practice to call someone by their name without proper salutation according to their culture.
  28. Do not start giving any of your personal information until and unless asked specifically. Keep it short and simple.
  29. Delay any talk of salary negotiation as long as possible. Try to understand your stand and company’s perspective before jumping in to salary discussion. If possible ask for some time before you can make some final judgement of accepting the job offer. Do not do it instantly until you know what you are getting is best as per your ability.
  30. Get proper details about the declaration of result of the interview. Be clear how and when you can expect the result from them. If not given clear instructions about this, make sure you ask it before leaving the interview premises. End the interview with smile and a “thank you” note. If possible send a “thank you” note to the interviewer.

Enjoy your interview!

Top 10 interview mistakes


Sometimes it helps to know what NOT TO DO if you are not very clear about what to do!

There are certain things which can ruin your chance to win your dream job. These are the thing you need to understand very well in order to make sure that you are not being considered as ineligible for the job you are appearing for.

While in interview, you need to make sure you are certainly not making any of the following mistake as it will increase the chance of being rejected for sure.

Take a look at what are the top 10 reasons why people fail to get the job they have been dreaming about:

Not enough preparation

This is the single most commonly made mistake and also a reason of failure for many people during their job interview. Not preparing enough can be related to many things. It could be your academic, professional or domain specific knowledge. It could be regarding  the company you are appearing in the interview for. It could be about other general topics which might be a part of interview session. To avoid this, try to do as much research as you can about the company, interview process, people who are going to take your interview and also any other general topics if that could be a part of interview process. Make sure you are very well equipped in your expected knowledge area, your academic and professional knowledge as well as your experience related questions. Many a times people do not even realize that they have not provided the latest and up-to-date information for an interview. At the same time, there are cases where candidate could not answer properly regarding their past work experience. This could straight away make you eligible for the first round rejection in the interview process. Do not ever underestimate the possibility of questions that could be asked. Try to do as much research as you can and make sure you are well prepared for most of the questions.

Being late

Punctuality is something your prospective employer will expect from you in the first place. Being late in the interview clearly shows that you are not serious about the interview or the job opportunity and this is considered a very negative aspect for any interview process.

Do proper research about the location and timings fo the interview. Do some homework about the route and direction to the venue. Check out the availability of means of transportation and approachability of the destination well in advance. Make sure you don’t get any surprises at the last moment in terms of reaching at the destination on the last moment.

Considering all the possible efforts that you could make to make sure you can reach the interview place in time, there can be a chance that you face some totally unexpected situation which could derail your schedule and you could be late. In such situation try your best to reach someone at the company whom you can convey your situation and provide proper justification about you being late. Inform them well in advance about your inability to reach in time. If it is going to be too late, check if there is a possibility to reschedule the interview? Try to make an all out genuine efforts to reach in time but if you still can not make it, be honest and proactive and inform the interview panel about your situation. This will give them a good impression about your punctuality and seriousness for the job opportunity.

Inappropriate dressing

It is very commonly expected that the candidate should wear a formal attire during the interview. It has to be an appropriate by the general criteria. In most cases, this would be formal official dressings for men and women. The definition of appropriate dressing could vary from person to person but you must understand that you need to respect the culture of organization you are appearing an interview for. Avoid wearing non-formal dresses like t-shirts shorts etc. Females must make sure that they are not wearing too revealing clothes as that would give an adverse impression to the interviewers. Avoid wearing heavy make-up and jazzy accessories. Mostly you should try to wear comfortable formal wears which could make you feel comfortable and confident.

Poor Communication Skills

Communication skill is one of the most important factor deciding your selection for the job. You need to be well prepared and well verse about the language in which you are supposed to give an interview. If this not being your native language then it is always better to communicate this clearly to the interviewer about that and seek apology in advance for any language related mistakes. Try to get as much exposure as you can and make yourself confident in the language in which you are going to attend the interview. If required, take some language classes to brush-up your skills and improve your language of communication.

Talk Too Much

Do no over communicate. This means you need to be aware about how much you are talking. You do need to give proper answers to all the questions you have been asked by the interviewer but you need to be concise and accurate in giving answers. Provide as concise and to-the-point answers as you can. Make it more objective and precise, include all the required details and data but try to avoid exaggeration. When asked about personal or behavioral questions, be very specific and avoid any lengthy and emotional reactive responses. You may have gone through tough situations in your personal life, but hardly any interviewers are interested in knowing your story. They would be more interested in knowing how you handle those situations.

Last but not the least, give your interviewer a chance to talk! Many candidates do not understand the signs from the facial expression or gesture of the interviewer that they need to stop talking now and give them a chance to say a word. Also listen carefully and let the interviewer complete their words before you start giving answers. Sometimes people do not listen to the complete questions and assume it, and start giving answer based on that assumption, this will give a very bad impression of yours to the interviewers.

Don’t Talk Enough

This is not a contradictory to the previous point, rather it needs to be considered in the support of the same. You need to maintain a balance of being not too talkative nor too silent. Do not be too shy or introvert during the interview. This will give an impression of lack of confidence, which could affect your possibility to get selected for the job. Be proactive, energetic and confident. Be aware about your loudness and speed while giving the answers. It should not be too loud nor too low. Also the speed of our words should be normal and easy to grasp. Some people talk too fast which sometimes makes it hard to understand what exactly they are saying.

Fuzzy Facts or Dishonesty

Never ever try to make them fool! Interview panel consist of the best and most experience people in the organization, do not try to give any false or wrong information or try to make them fool. Do not try to confuse them or give vague answers. If you do not know something, be honest and accept it, this will give a better impression rather then trying to give wrong answer. If you realize that you have made a mistake, or if interviewer points to some wrong data you have provided, admit it honestly. Do not try to defend the wrong answer you have given or getting in to argument with interviewer is the sure way to get rejected. If you feel that you are correct and there is a misunderstanding, try to convey it very politely and in friendly manner. If you are not sure and confident, then never ever try to prove yourself right.

Badmouthing Past Employers

Never ever do a badmouthing of your past employers. This will give a wrong impression about you to your interviewer. Since they could also be your employer, they will feel there is all the chance that you will say the similar things about them in future. This will also give an impression of yours being negative and naysayer.

Personal Hygiene

Be very careful about your personal hygiene. People sometimes do not give enough attention to this. Having a bad breath or foul body oder could make situation adverse for you. You need to be clean and free of body oder. If you think you are suffering form bad breath, try to use some mouth freshener before an interview. If you are suffering from bad body order, try some mild perfume to get rid of it.

Follow Up

Get very clear picture of how and when will you get the result of your interview process. Sometimes it becomes difficult to do a proper follow up regarding this. Normally companies provide you a very clear picture about the schedule and mode of communication for the interview results. In that case it is easy, but if this is not properly communicated, then make sure you get a proper contact details to whom you can follow up later about the result. Do not be too aggressive in follow up, as this could hamper your impression or give a false impression about you being eager and desperate to get the job. There is nothing wrong in this, but this could adversely affect your stand during the remuneration package negotiation. Try to use the official means of communication, that includes official phone numbers or email address. Do not try to reach someone on their personal communication address until you know them personally.

Closure: These are general guidelines to be careful about interviewing process there could be many other factors depending upon the exact situation. Hope this helps. Wish you a very best of luck for your next dream job! Have a great success in your interview.


Interviews do not have to be nightmarish anymore!

job-interviewSteve Jobs said “Death is the most common destiny we all share”, just like that, I would say Interview is the most common process all the individuals on this earth who would have ever opted for a job would have shared!

You find a wonderful job opportunity which looks like the best match for your skills, talent and qualification, now what? What’s next?

You must clear the process of interview to get your dream job, and we know this is not a simple task for most of us. Even those who are excellent in their respective skills feels a level of stress just by the name of interview. The term interview has become a synonym of a stressful process where you have to perform consistently in the multiple round providing the proof of your talent in order to get the success.

Here’s how to interview, including tips and strategies for effective interviewing from preparation through follow up.

Organization Research

Finding as much information as you can about the organization should always be your first step. Gathering details and background information about the organization with which you are planning to work, plays a very crucial role in passing the interview. Typically you will need to be prepared for the questions like “What do your know about our company”? and “Why do you want to work here?”

You can make your interview more interesting and interactive by increasing your knowledge about the company or the organization. Not only that, it can actually help you perform better and make a better report with interview panel which will give you added advantage over the other candidate competing for the same position. Normally there can be two categories of sources you can depend upon to get information about the organization:

(1) Official

This is the official source which is normally controlled by the organization. This includes their official website, newsletters, publication etc. This sources are normally in control of the organization so whatever information you get thru this, is normally what they wants to share with public. There is a possibility that it might not give you the complete transparent information about everything.

(2) Social or personal

This is the “other” category of resources where you get indirect sources which gives you the details about the organization. Google is one of the most powerful tool today anyone can have to find information about any company. Apart from that there woud be other resources like your friends or family or someone in your contact who might be working with the organization or know someone who might be working there.

Practice Practice Practice

We all know from our school days that practice makes man perfect! Same applies to the interview as well. More you practice more you become confident and that would help you in the actual interview since you have already gone thru similar process several times mentally. Nowadays we have an access to so many tools and technology which can help us in doing effective practice. Record your response in audio or Video format and replay it to see for yourself how you actually perform. You can also take help of your family members or friends for this purpose. Try to find and prepare answers for commonly asked interview questions. This will actually give you an edge over your competition and enhance your chance of winning the job.

How you behave is Important!

It is becoming a very common practice these day to evaluate a person on the behavioral level. They ask you different questions which might now have any correct answer but how you provide a response to those questions will speaks a lot about who you are. These are the open ended questions which would compel you to give response in your own words and thats where they can judge the person in more detail.

It is based on the premise that a candidate’s past performance is the best predictor of future performance. Rather than the typical interview questions on your background and experience, you will you need to be prepared to provide detailed responses including specific examples of your work experiences.

The best way to prepare is to think of examples where you have successfully used the skills you’ve acquired. Take extra the time to compile a list of such situation to both types of questions and to itemize your talents, skills, values, and interests as well as your strengths and weaknesses. Emphasize what you can do to benefit the organization rather than just what benefits you will get from the company. Another very important things is to prepare a list of questions you want to ask the interviewer. Keep in mind, you are not just trying to get a job, you are also going to get a chance to interviewing your prospective employer and assess if the organization is best fit for you or not!

Final Countdown – Interview Preparation

Make sure you are perfectly on time for the interview. This is the most important factor most interviewers check. Here, on time means at least ten to fifteen minutes before the actual scheduled time of your interview. Do some homework on the prior day about the route, location, connectivity etc. Consider other factors which might would take some unplanned additional time to reach the exact location and plan accordingly. Sometimes it takes almost double the time to reach a specific destination in rush-hours. Make sure you are not late due to any such obvious reasons. In the worst case, if you are going to be late in the interview, make sure you have informed them about your situation. Be proactive and provide them the exact details about your situation and estimated time by which you are going to be late. Try to get some details about the person(s) who are going to take your interview. It will always help if you know the person, his background and any other information if you can get, this will help you customize your answers and behavior according to their choice.

Stay Cool and Calm

It is very obvious that you will have some stress and pressure related to interview. We all get tense in such situation, this is very natural and common so dont worry about it. Instead, try to work on reducing the level or stress for interview. Stress will only create hurdle in your way to achieve your dream jobs. Consider it as the final road block between you and your dream job and work on easing it or removing it. You will be able to perform much much better if you are not under the influence of any stress. Remain as calm as possible during the process of interview. Ask for clarification if you think you are not clear about the question, but never ever provide a false answer or DO NOT TRY TO MAKE THEM A FOOL. Remember, they are smarter and more experience then you.

The End

Make the closure as pleasant and smooth as possible. Try to be friendly but make sure you dont sound immature. Thank everyone on the board with some positive note and reiterate your willingness to contribute to the success of the organization.

Follow Up

Mostly all the organizations provide a very clear feedback to the candidates after the interview process is over, but in case if you think there is an unusual delay in getting some feedback from the organization, try to reach some authorize person and get the feedback on the interview process. Try formal means of communication to communicate with them. This can be an official email of Human Resource (HR) department or Official phone number provided by them. Never ever try to reach anyone through some non-formal means of communication like social media or personal phone numbers of someone from the interview panel.

Have a Happy Interview!