Saturday, December 24, 2016

Installing Eclipse IDE For Java Programming

In this page we will discuss how to Download and install eclipse IDE and develop our first Java Program using eclipse. IDE means Integrated Development Environment is a software application that provides comprehensive felicities to computer programmer for software development.It contains a code editor,a compiler or interpreter and a debugger.  It also contains build automation tools. It is one of the widely used IDE in the world. 

Why do we need eclipse IDE:
Basically to run a java program as i written my previous posts,we need to enter some commands to compile and execute a java program. But i don't want write those commands and i don't waste our time then a simple solution is eclipse IDE. So you can write a java program in eclipse editor and you can run that program simply click buttons.

First we will see the steps how to download eclipse for java programming.

Step 1: In the Google Search Bar type http://www.eclipse.org then select Download option

Step 2: Then click on the Download package link

Step 3: Here you can see different types of versions and based on your operating system you have to download.

Step 4: Choose for eclipse IDE for java Developers to develop Java Programs.

Step 5: You can also down load this eclipse in Linux or Mac also



How to install Eclipse IDE in Windows Environment:

Step 1:  Once your downloaded finished you can see ZIP file in the location where you have saved your download. 

Step 2: Now you have to extract that ZIP file. Once your extract finished you can do open up that folder inside that you can see eclipse folder. 

Step 3: In that folder you can eclipse application icon. You can also create short cut icon on your desktop. Simple right click on eclipse icon then pop up box opened, where you can select short cut option.

Step 4: Now Double click on eclipse icon to launch eclipse IDE editor.

Step 5: After launching eclipse IDE it will ask for location to store the projects you are going to appear in eclipse.




Step 6: By default It saves under the Home directory,if you want save in other location you can browse and select other location too. Then click on OK.

Step 7: Once you open up your eclipse IDE it will show Welcome screen. You simply close it.

Step 8: Let me see, how to create java project and how to run First Java program

First we need to create Project, for that we should go to File--->New-->Java Project 





As shown in the above slide you have to give project name as Core java programs  then leave all these things as it is. Then click on the next button then click on the Finish Button. 

Next click on the Core java program option,in that you can see src folder,right click on the src folder then the pop up box will appear like below to create new class for Java program.


Then go to New option which shown in the above slide, and go to class then it will show like below slide.

Then give a class name as welcome and then you can select checkbox public static void main() method then click on Finish Button. It will open up Some code like Below.



Next you can write a statement to dispaly "Hellow World" statement using System.out.println("Hellow World");

After writing the statement click on save button. Finally Click on the Run button in eclipse to see output as "Hellow World".

I hope you enjoy this concept let me know your comments on this concept.keep follow me for latest updates.

Thursday, December 22, 2016

How does Server works

In this post we will know how Web Server works. A server is a computer program or device that provides the functionality to other programs or devices called clients. Server can provide various functionalities often called services such as sharing data,performing computation for client.

The main purpose of server is to share data and as well as to share resources and distribute work. A single server can serve multiple clients and a single client can use multiple servers. There are different types of servers such as web server,mail server,application server,proxy server,Database server,FTP server etc.. But In this blog we will learn How server works internally. 

The server the part of client-server model, in this model server serves the data for clients. The nature of communication between a client and server is request and response. For example, web server software can run on any capable computer, so a laptop or personal computer can host a web server.


 
When ever the user(client) wants some data then he used to send request to the server(which serves all information). The main function of server is to listen the client incoming requests. The request for the web page is transmitted to the corresponding web server.Then server fetches and assembles the web page and re-transmit it using protocol like HTTP and finally users(clients) receive the data which he required.

Now, what happens if several requests to the server at the same time, the server can able to serve to all requests at a time. 

Wednesday, December 21, 2016

How to convert ArrayList to Array In Java

In this post we will learn how to convert ArrayList to Array in Java. I am sharing two methods of converting ArrayList to Array. In Java ArrayList is one of the important class in Collection Framework. It represents growable collection of objects whereas Array is fixed length collection of objects.In previous post we were discussed about how to get IP address of any website,today we will discuss about conversation ArrayList to Array. 

Method 1:  To convert ArrayList to Array The following method we used

Object[] toArray() method.

Syntax: public Object[] toArray()

In the above toArray() method is existed in interface collection and interface list. It returns an array containing all of the  elements in this list in correct order. 

Why need to convert ArrayList to Array:
There might be a scenarios where the output of a java API method is in ArrayList format and our business requirements is expecting an array,therefore we need to conversion AarryList ot Array.

Consider the following example Converstion using toArray() method:

import java.util.*;
class ArrayListToArray
{
public static void main(String args[])
{
List  al=new ArrayList();
al.add("learn");
al.add("java");
al.add("bylucky");
String[] arrayString=new String[al.size()];
al.toArray(arrayString);
for(String element: arrayString)
{
System.out.println(element);
}
}
}


Output:






In the above example we have a list of Strings of ArrayList values. Then convert the collection to an array using toArray() method of the List. toArray() method returns an array of type object.we need to typecast it to String before using as String objects.If we do not typecast we get compile time error.

In another method is manual method to convert ArrayList to Array using get() method as follows:

We can use get() method if you don not want use java bulit-in method toArray(). Sometimes Interviewer may ask you without using toArray() method how can you convert ArrayList to Array. By that time manual method is very useful.

Consider the following example Conversation ArryList to Array using get() method:

import java.util.*;
class ArrayListToArray
{
public static void main(String args[])
{
List<Integer>  al=new ArrayList<Integer>();

al.add(10);
al.add(20);
al.add(30);
al.add(40);
al.add(50);
Integer[] arr=new Integer[al.size()];
for(int i=0;i<al.size();i++)
arr[i]=al.get(i);
for(Integer element:arr)
System.out.println(element);

}


Output:










Let me know if any other methods used to convert ArryList to Array and Keep follow me for latest updates.

 

Tuesday, December 20, 2016

Agile Software Development For Beginners

In this page we will understand and learn about agile software development methodologies and how to use them in real time software development process. Agile software development focuses on keeping code simple,testing often and delivering functional bits of the application as soon as they are ready. The main purpose of Agile Software Development is to build upon small client approved parts as the project progresses as opposed to delivering one large application at the end of the project.

Agile software development is an umbrella term for a set of software development methods based on iterative and incremental development. The most popular Agile methodologies  are scrum,Crystal etc.. Agile is a way to manage projects. It breaks down larger projects into small,manageable chunks called iterations.

Unlike waterfall project manager,which is strictly sequenced:
you don't start design until research is done and you don't start development until the designs are signed off on. In agile software development process designers and developers and business people can work together simultaneously.

There are mainly 10 principles in our agile software development process they are

  • The highest priority is to satisfy the customer through early and continuous delivery of valuable software.
  • Deliver working software frequently, it might be couple of week to a couple of months
  • If our requirements changing frequently,even late in development agile's process harness change for the customer's competitive advantage
  • While developing project Business people and developers must work together thoughout the project
  • The most efficient and effective method of conveying information to and within a development team is face-to-face conversion
  • Agile process promote sustainable development.
  • Continuous attention to technical excellence and good design enhances agility 
  • It provides simplicity
  • The best architectures, requirements, and designs emerge from self-organizing teams.
  • At regular intervals, the team reflects on how to become more effective.
          

 Why Agile:

Agile lets you get your concept to your users as quickly as possible. It gives flexibility to our projects. Because now a days software projects consistently change. As product comes to the market expands,you should be able to react and update the product accordingly. Unlike a a fixed budget project,agile is flexible with regard to scope.Agile is not about paying alot with uncertainty, it is about paying for only what you need. Agile integrates testing thoughout the process. Cconsistently delivering tested software means higher over all quality and less time spent on the full application.

How Agile works:

 This guide focuses on Scrum,but many of the features are universal. Scrum projects are broken down into short iterations generally 1-3 weeks called sprints. The life cycle of each sprint includes:

  • planning
  • Execution
  • Review
  • Repeat
  Each scrum project begins with a kick-off meeting. The kick-off meeting goals are:
  1.  An overview of the project and goals
  2. who will be working on the project
  3. Determining the point person for client sign-off
  4. creating the project backlog
  5. Determining which features to work on
  6. Getting on the same page  

High Paying Jobs after Learning Python

Everyone knows Python is one of the most demand Programming Language. It is a computer programming language to build web applications and sc...