0

Mastering Java with OOPs: An Introduction to Object-Oriented Programming Concepts


 

The fundamental OOPs concepts in Java are:


Encapsulation: Hiding the internal details of an object from other objects, and providing a public interface to interact with the object. This is achieved through the use of access modifiers (private, protected, and public) to control the visibility of class members.


Inheritance: A mechanism for creating a new class based on an existing class, inheriting its properties and behavior. This allows for code reuse and the creation of a class hierarchy, making the code more organized and easier to maintain.


Polymorphism: The ability of an object to take on many forms, allowing the same method to be used with objects of different classes. This is achieved through method overloading (having multiple methods with the same name but different parameters) and method overriding (having a method in a subclass that has the same name and parameters as a method in its superclass).


Abstraction: Hiding the implementation details of a class and exposing only the necessary information to the user. This is achieved through the use of abstract classes and interfaces, which provide a blueprint for other classes to follow.


Association: The relationship between two classes, where one class has a reference to an instance of the other class. This can be unidirectional or bidirectional, and can be further classified as a one-to-one, one-to-many, or many-to-many relationship.


Aggregation: A special type of association where one class is a part of another class. For example, a "Department" class may have multiple "Employee" objects, but the "Employee" objects can exist independently of the "Department" class.


Composition: A stronger form of aggregation, where one class is made up of multiple instances of other classes. The objects of the composing class cannot exist independently of the composed class.


By utilizing these concepts, Java developers can write organized, reusable, and maintainable code.

More
1

java computer programing language history and its overview

java computer programming language history and its overview


Java is a high level computer Programming language developed by James Gosling at Sun Microsystems and was released in 1995.

Special features of Java is that we can write once, run anywhere. Meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.

Initially it was called Oak after an oak tree that was outside Gosling's office. Later it was renamed to Java.

At start Java was designed and developed for small computing devices but later it was adopted but many other platforms. Right now billions of deceives are using Java in different platforms.

Example :

Mobile Applictions : Java is used in mobile phones. Currently Android and Java ME are used for creating mobile applications.

Web Applications : Java is used in web sites to create dynamic pages. Java uses struts, servlet, jsp etc. technologies for creating web applications.

Computer Applications : Java is also used in developing Computer application or Desktop application.

to know more about Java programming language visit Introduction to Java  
More
0

Boolean data type and its exmples in java programming


  • Boolean is a primitive data type.
  • Boolean is the smallest data type in Java which is made up of only 1 bit.
  • Boolean data type represents only two possible values -  True and False.
  • The default Boolean value is False.

Syntax to Declare Boolean variable :

 boolean <variable name> = <default value>;

Example:

  boolean x = true;
  boolean y = false;

Simple Sample Program Describing Boolean Data Type:

  public class Main {
    public static void main(String[] args) {
      boolean x = true;    
      System.out.println("x is " + x);

      int y = 5;
      boolean z = (y > 15);
      System.out.println("z is " + z);
      }
    } 

Output:

  x is true
  z is false

The above is a simple example for Boolean data type in Java programming and click the link Primitive Data Type to learn more about other Data types in Java.
More
0

Download Eclipse Software And Installing Android SDK for Android Application Development

This tutorial is to explain how to Setup Android SDK with Eclipse. You may find many website which explains how to setup android development in eclipse and i tried to make the tutorial simple by adding images to it. Before we move forward with the tutorials we must know the system requirement Android SDK and they are listed below.


System Requirement For Android SDK :
Operating Systems
  • Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)
  • Mac OS X 10.5.8 or later (x86 only)
  • Linux (tested on Ubuntu Linux, Lucid Lynx)
  • GNU C Library (glibc) 2.7 or later is required.
  • On Ubuntu Linux, version 8.04 or later is required.
  • 64-bit distributions must be capable of running 32-bit applications.


1. Eclipse 3.6.2 (Helios) or greater
   Note: Eclipse 3.5 (Galileo) is no longer supported with the latest version of ADT.
2. Eclipse JDT plugin (included in most Eclipse IDE packages)
3. JDK 6 (JRE alone is not sufficient)
4. Android Development Tools plugin (recommended)
5. Not compatible with Gnu Compiler for Java (gcj)

Other development environments

1. JDK 6 (JRE alone is not sufficient)
2. Apache Ant 1.8 or later
3. Not compatible with Gnu Compiler for Java (gcj)
   Note: Some Linux distributions may include JDK 1.4 or Gnu Compiler for Java, both of which are not supported for Android development.

The above are the System Requirement for Android SDK and lets move on with the tutorial. Follow the below given steps to Setup Android SDK in Eclipse.

Step 1 : Download Android SDK And Unzip It

First step is to download Android Software Development Kit(SDK) and unzip the file to your specified folder. You can download Android SDK from Android SDK download page. After the download is finished you need to open the zip file and unzip the file to any of your specific folder.

Note : while unzip SDK file choose a folder location where the file wont get deleted because this file will be used by eclipse later.

Step 2 : Download Eclipse And Run Eclipse IDE

Now you need to run Eclipse to install Android SDK and if you don't have Eclipse IDE in your system then you can download Eclipse by Clicking Here. You can download latest version of Eclipse IDE from the given website and the website will look like below given image.

download eclipse for android
After finishing the download of Eclipse IDE, Unzip the file and open the unzipped folder and run the Eclipse.exe file. The below image will occur and Eclipse IDE will open.

eclipse juno
You need to select a workspace where all your projects and related files will get stored. Click Browse as shown in the blow image and select a folder of your choice where all your files and project will get stored.

eclipse work space
3. Installing Android Development Tool (ADT) Plugin To Eclipse :

Once you open Eclipse and set Workspace for it then you can install Android Development Tool (ADT) plugin using few simple steps as shown below.

   i) Start Eclipse and select Help -> Install New Softwares... as shown in the below image.


install new software in eclipse

   ii) Install window will appear in that click Add button. Add Repository window appears.

   iii) Add Name as Android and Location as https //dl-ssl.google.com/android/eclipse/  in Add Repository window and press OK .

install plugin in eclipse
   iv) Now you will see the Developer Tools in the Install window.

   v) Press Select All and press Next button.

install plugin in eclipse juno
   vi) Now you need to select file location and click Next button to install SDK.

configure android in eclipse
   vii) In Choose Packages To Install window select Accept All and click Install button.

install android sdk in eclipse
In the Android SDK Manager window, you can see a list of Android versions available and Extra tools. You can download and use any Android version but its better if you start using Android 2.1 which is the basic version that support most of the Android devices.

android sdk manager
Step 4: Configuring Android SDK

Now after downloading Android SDK and installing Android Development Tool plugin next step is to Configuring Android SDK. Follow the below steps

   i) Select Window -> Preferences in Eclipse.


   ii) In SDK Location select the folder location where you have saved the SDK file which we unzip on Step 1 and we need to select a SDK from it and press Apply button and then finally click OK button.

configure android sdk

 Step 5 : Creating Your Android Virtual Device

   i) Lastly we need to create the Android Virtual Device that will be our Android Emulator through which we can run and test our Android Projects in our PC.

   ii) You can create Android Virtual Device by clicking on the icon on Eclipse as shown in the below or you can select it by clicking on Window -> AVD Manager.

android virtual device
   iii) Now Android Virtual Device Manager window will open and there you can see a New button on the right side. Click the New button.

   iv) Create new Android Virtual Device Window will Appear and it has Name, Target and other options in it.

   v) In Name write any name which you would like to use and in Target select the Android Version which you would like to use in your Android Emulator and leave the other options as it is and finally click on Create AVD.

Now you can start programming Android applications and when you run the application, the application will be executed in Android Emulator.

android emulator windows

android 4.0
More
0

What is Android

what is android operating system, about android

Android is a Linux based operating system mainly created for mobile phones such as smartphone and tablet computers. Android operating system is also used in embedded systems such as networking equipment, smart TV systems including set top boxes and built in systems and various devices as varied as house hold appliances and wrist watches.

Android Inc was started in Palo Alto, California, United States on October 2003 by Andy Rubin. Google bought Android Inc on August 17, 2005. With 500000 new Android activation's a day, it is becoming the dominant player in mobile operating system and now majority of mobile device use Android Operating System in it.

Android Versions :

Android Released its  first version "Astro" on September 23, 2008 and since then it has been updating frequently which fixes bugs of previous versions and improves performance by adding new features. Below are the list of Android version released till date.

1. Astro was released on November 5, 2007

2. Bender was released On February 9, 2009

3. Cupcake was released on April 30, 2009

4. Donut was released On September 15, 2009

5. Eclair was released On October 26, 2009

6. Froyo was released On May 20, 2010

7. Gingerbread was released On December 6, 2010

8. Honeycomb was released On February 22, 2011

9. Ice Cream Sandwich was released on October 19, 2011

10. Jelly Bean was released on July 11, 2012

This are the Android versions released upto date and Each version after Astro and Bender is named in alphabetical order after a dessert or sweet treat, with "Cupcake" being the first and every update since following this naming convention.
More