Skip to main content


Encapsulation in Practical.

Encapsulation is one of the four fundamental OOP concepts.Encapsulation is the technique  to Provide the ability to a program to hind their internal characteristics and behaviorof by  creating
private fields in class and providing access to them via public methods.
If a field is declared private, it cannot be accessed by anyone outside the class,
thereby hiding the fields within the class.So encapsulation  protect them by unauthorized access / party  by creating a protecting wrapper around your code and data.

Encapsulation can be described as a protective barrier that prevents the code and data being
randomly accessed by other code defined outside the class.
The main benefit of encapsulation is the ability to modify our implemented code without breaking the code of others who use our code. With this feature Encapsulation gives maintainability, flexibility and extensibility to our code.

For Example

We have a data class with two fields name and id

public class Result{

   private String name;
Recent posts

Deploy war on weblogic server by weblogic console

In this post we will see how to deploy a war on weblogic by using weblogic console.

1)First start the admin server of your weblogic server  for this browse to the path of domain of your weblogic server .it will be some what like


here you will get all the domains created
so in


you will get  startWebLogic.cmd or
depending on your OS Just run it and you will see a cmd console

2)Now If your weblogic server is started succssfully it will display running in console

3) After starting weblogic server succssfully . Open the weblogic console from the below linkhttp://localhost:7001/console

where localhost is the machine address on which weblogic server is running.And 7001 is the port on which weblogic admin server is running.
4)Now it will ask for username or password just enter your domain username and password
and it will redirect to a screen.

5) Now click on deployment on the left side…

Some Advanced Ant Tasks (ANT Part-5)

In our last posts we have seen 
What is Ant("Another Neat Tool")?How to configure it in your machineCreate,Delete and Compile by ANTSome Core Ant Tasks  (ANT Part-4)
Sleep: If you want some gap between two tasks or want some pause then  this task is used to sleep the build process for a while. We can use milliseconds,seconds and hours also in aatribute. 

<sleep milliseconds="10"/> 

 Sql: To execute some query or after finishing a task you want to update some column in any table or want to fire any type of query then this task is used to execute SQL commands using Java JDBC connectivity.  <sql   driver="jdbc driver name"   url="jdbc url"   userid="ui"   password="pass"   >  insert  insert into aots_users values (1, "aots1");  </sql> 
FTP: After creating any patch or folder you want to copy it on nay FTP to allow others to access it from another location then this task is used to ftp files to a ftp server  <ftp …

Some Core Ant Tasks (ANT Part-4)

In our last post we have seen 
What is Ant("Another Neat Tool")?How to configure it in your machineCreate,Delete and Compile by ANTNow we will see some core task which can be performed by using ANT. Below are some of the most useful tasks .

GUnzip: This task is used to unzip and expand the tar files with gz
extensions. These files are unziped in the current folder.

<gunzip src="abc.tar.gz" dest="aaa.tar"/> 

Gzip: This task is used to zip the source files using GZip  algorithms. The source(src) and the destination (destfile or zipfiles) attributes are mandatory  <gzip src="aaa.tar" destfile="abc.tar.gz"/> 

Copy: Copy a file to a new file or to a new folder.  <copy file="copythis.txt" tofile="tothis.txt"/> 

Delete: This task is used to delete a folder , file and folder's entire sub directories. the properties used with delete are includes, includesfile, excludes, excludesfile or defaultexcludes to add or…

Create,Delete and Compile by ANT build file.(Ant Part-3)

In our last post we have seen 
What is Ant("Another Neat Tool")?How to configure it in your machineNow we will see some core task which can be performed by using ant such as create a folder or delete folder and to compile the java source.If till now you have not got 1% idea about ANT don't worry it is not needed also just check the below XML build file.

<?xml version="1.0"?><projectname="MyfirstAnt"default="main"basedir="."><!-- Sets variables which can later be used. --><!-- The value of a property is accessed via ${} --><propertyname="create.dir"location="D:/MyAnt/NewFolder" /><propertyname="delete.dir"location="D:/MyAnt/OldFolder" /> <!-- Deletes oldFolder from the path delete.dir--><targetname="cleanFolder"><deletedir="${delete.dir}" /></target><!-- Creates a newfolder on the path create.dir-…

Setting Apache ANT on Computer (Ant part-2)

Setting up your machine with AntFollow the steps to setup the Ant in your computer.

1. Download the following  files( to your hard drive.

2. Unzip the file to anywhere in your hard drive in any folder.

3. Right click your My Computer icon in the Desktop and choose the properties.

4. In the properties now select the Advanced tab and open Environment Variables button.

5. Click on the New button in the System Variable options and enter the following
Variable name - ANT_HOME
Variable value – The ant path location in your system (for example C:\ant\myant)

6. Click the OK button ans save the setting

7. Set the PATH as below in your system (If you have a PATH variable exists in your system then
append the ANT_HOME to it)
set PATH=%PATH%;%ANT_HOME%\bin

What is Apache Ant ("Another Neat Tool") in java?(ANT Part-1)

Apache Ant ("Another Neat Tool") is a  build tool with special support for the Java programming language however it may be used for regarding everything. Ant is platform-independent. Ant is especially sensible at automating difficult repetitive tasks and so is well matched for automating standardized build processes. Ant accepts directions within the type of XML documents so is extensile and simple to take care of.So you can say it is a xml file you running by the help of Ant.

An ant build file comes within the sort of an XML document, all that's needed may be a straightforward text editor to edit the build file(s). an editor that gives XML syntax lightness is desirable. The ant installation comes with a JAXP-Compliant(Which is XML parser) ,this implies that the installation of AN external XML computer program isn't necessary

For Installation 

1)You will need to download a file
2)Extract it 
3)Here you will get "bin" folder
4)In "bin…