Ask Google

Custom Search

Tuesday, February 22, 2011

Ask Java 6

Today i will cover simple and basic question if someone ask you what is java.
The first things you need to know regarding java is Object Oriented Programming or in
short OOP.So What is OOP?

What is OOPs?

So your answer when people ask you this questions, what you will do is
you just rilex and explain to them OOP is programming whereby you
organizes your program in well defined interfaces to the data in object.Means
everything is in object.Nothing more.We can say object oriented as how we access
the data through object or in other word data controlling to code.


Monday, February 21, 2011

Ask Java 5

Topic for today we will cover simple basic question regarding access right.
Lets say if main method we declared it as private?What will happen?

When main method is declared as private, it will shows you
message says "Main method not public" during runtime.Of course it will
compile properly.


Sunday, February 20, 2011

Ask Java 4

Today i will cover one more question here..simple yet basic

What is mutual exclusion? How can you take care of mutual exclusion using Java threads?

Java provides many utilities to deal with mutual exclusion with the use of threaded programming.
Mutual exclusion is where no two processes can access critical regions of memory at the same time.

For mutual exclusion, you can simply use the synchronized keyword and explicitly or implicitly provide an Object, any Object, to synchronize on.

The runtime system/Java compiler takes care of the gruesome details for you. The synchronized keyword can be applied to a class, to a method, or to a block of code. There are several methods in Java used for communicating mutually exclusive threads such as wait( ), notify( ), or notifyAll( ). For example, the notifyAll( ) method wakes up all threads that are in the wait list of an object.


Saturday, February 19, 2011

Ask Java 3

What is a cartesian product in PL/SQL?

 When a Join condition is not specified by the programmer or is invalid(fails), PL/SQL forms a Cartesian product.

In a Cartesian product, all combinations of rows will be displayed.

For example, All rows in the first table are joined to all rows in the second table. It joins a bunch of rows and it's result is rarely useful unless you have a need to combine all rows from all tables. 


Thursday, February 17, 2011

Difference between private, protected, and public?

What is the difference between private, protected, and public?

These keywords are for allowing privilages to components such as functions and variables.

Public: accessible to
all classes
Private: accessible
only to the class to which they belong
Protected: accessible to the
class to which they belong and any subclasses.

Wednesday, February 16, 2011

Ask Java

What is a virtual function in C++?

Simply put, the virtual keyword enables a function to be 'virtual' which then gives possibility for that function to be overridden (redefined) in one or more descendant classes. It is a good feature since the specific function to call is determined at run-time. In other words, a virtual function allows derived classes to replace the implementation provided by the base class.

If u like this post clik this


Tuesday, February 15, 2011

Semantic Technology

Semantic Technology Part II

Semantics contrasts with syntax, the study of the combinatorics of units of a language (without reference to their meaning), and pragmatics, the study of the relationships between the symbols of a language, their meaning, and the users of the language.

The formal learning of semantics is therefore complex and complicated.Basically, the Semantic Web is only about two things. It is about common formats and pattern for integration and combination of data drawn from diverse sources, where on the original Web mainly concentrated on the interchange of documents. It is also
about language for recording and captured the way data relates according to real world objects.
That allows a human, or a machine, to start off in one database, and then move through an unending set of databases which are connected not by wires but by being about the same thing or in others words nodes.

The Semantic Web is the extension of the World Wide Web (WWW) that let the user to share content beyond the boundaries and limits of applications and websites. It has been explained in rather different ways: as a utopic vision, as a web of data, or merely as a natural paradigm shift in our daily use of the Web.

All the time, the Semantic Web has inspired and engaged many people to create and invent innovative semantic technologies and applications. is the common platform for this community.

Inversion of Control

Inversion of Control Part II

Objects can be obtained by means of Dependency lookup or Dependency injection. Dependency lookup is a pattern where a caller asks the container object for an object with a specific name or of a specific type. Dependency injection is a pattern where the container passes objects by name to other objects, via either constructors, properties, or factory methods.

Most of the situation, it's not necessary to use the container when using other parts of the Spring Framework, although using it will likely make an application easier to configure and customize. The Spring container provides a consistent mechanism to configure applications and integrates with almost all Java environments, from small-scale applications to large enterprise applications.

The container can be changed into a partially-compliant EJB3 container by means of the Pitchfork project. The Spring Framework is criticized by some as not being standards compliant. However, SpringSource doesn't see EJB3 compliance as a major goal, and claims that the Spring Framework and the container allow for more powerful programming models.


  © Blogger template The Beach by 2009

Back to TOP