Thursday, 19 June 2014

STRING AND STRING BUFFER

STRING AND STRING BUFFER String class is a immutable class . Immutable classes are those classes in which if we create object of that class and after that alter the content of that object then every time a new object is created that store the altered content  String buffer class is mutable class . Mutable classes are those classes in which if we create object of that class and after that alter the content of that object that changes will occur in same object . No new object is created . EXAMPLE : String s = new String("Hello"); s=s+"World";  Understand that , a string s is created in line 1 in which initially we put "Hello" in string s . And in statement second we have concatenated string s . And add further "World " to this . As this is a string class and...

Wednesday, 18 June 2014

STATIC KEYWORD AND FINAL KEYWORD

STATIC KEYWORD : Consider the following program      class Print     { static int a; int b; void get(int a,int b) { this.a=a; this.b=b; } void op() { System.out.println(a+""+b); } public static void main(String args[]) { Print p=new Print(); p.get(10,20); Print p1 = new Print(); p1.get(30,40); p.op(); p1.op(); }     } Static keyword is used...

Tuesday, 17 June 2014

USING ECLIPSE

Software requirements: To develop applications of Android in eclipse , following are the Software requirements : JDK full. Android SDK Eclipse JDE Eclipse ADT (Android development Tool) plugin. Android SDK contains tool libraries, Emulator (AVD - Android Virtual Device ). Emulator provider platform to users to see how their application will appear on handset when installed . A virtual mobile appears on the screen. It will look like the actual screen of mobile handset we see. AVD also asks developer for which particular handset developer wants to appear on the screen . Before opening eclipse , unzip and extract the files of JDK full and Android SDK . After these have been extracted now install eclipse . Eclipse will automatically access...

Monday, 16 June 2014

Trending OS based Mobile Phones

CELL PHONES VERSUS SMART PHONES : In the 5 years we moved from cell phones to smart phones . Smart phones are user friendly, high at technology . Not only at software basis but huge improvements are observed at Hardware basis also . Fast processors , huge internal memory , access to external memory , touch screens , large screens , better cameras , sensors etc . make the mobile phones compete in market. 5 or more years back we mostly had mobile phoned which provided us with the facility to call and sms only . Those phones were black and white and today we have mobile phones that provide us huge set of applications , internet facilities and what not . Mobile phone have almost decreased the need for using desktops and laptops for small and daily use purposes . Laptops are these days used...

Sunday, 15 June 2014

ACCESS SPECIFIERS

Access specifiers  Access specifiers are used to declare that who can access the method and data members of a  class . We have seen many programs till now and often keyword pubic was used .By using this keyword we declared the class or method to be public. We have Four types of Access Specifiers :   public protected default private  public : If a class or method is public , it means the method can be accessed in the same class , as well as in other class in same package and in the class of other packages as well . Also can be accessed by the derived classes protected  : If a method or class is protected , it means that the method can be accessed by the classes of that package only to which the class itself belongs . And methods can be accessed...

Saturday, 14 June 2014

INHERITANCE IN JAVA

INHERITANCE IN JAVA: When one class called the derived class inherits the property of other class called the parent or base class is called Inheritance . If class A is inherited from class B , it means that class A can access all the data members as well as methods of class  B and class A can also define its own data members and methods . Inherited class can have its own properties also in addition to the properties of parent class . IN Object Oriented programming , Inheritance is of five types . C++ supports all these five types . However in JAVA Multiple inheritance is not supported . We use keyword 'extends' to inherit  class  .  Five types of Inheritance is : We will explain these one by one . SINGLE INHERITANCE...

Friday, 13 June 2014

PACKAGES IN JAVA

CONCEPT OF PACKAGES:  Packages is the collection of classes . Like in folder we handle files , hence for handling classes that belong to same category are kept in a single folder . This folder is called a PACKAGE . JAVA provides syntax for creating , as well ass accessing the classes of a package . We will see here how to create our own package and how to access a class for already existing package . Packages remove the complexity . like folders provide organisation for files , in the similar way packages provide organisation of classes . packages make it easy to reach and search a file . Packages also provide the benefit of Data hiding . INBUILT PACKAGES : In-built packages are already available in java . A particular...

OVERLOADING

OVERLOADING : Using any entity in more than a single way in programming is called overloading . Overloading is possible in c++ as well as JAVA . In general , every programming language provides  two types of overloading : OPERATOR OVERLOADING : Operator overloading is the criteria of using the same method name for different operations . An operator for different data types give output accordingly . Consider the following example : In JAVA , operator overloading is not possible but it uses internal operator overloading . It means that user cannot defined operator overloading , but for some cases operators are already overloaded in JAVA . They are already defined in in-built classes. METHODS OVERLOADING : In method...

INPUT FROM USER

TAKING INPUT FROM USER : Like in C++  .  cout and cin commands were contained by library iostream.h  And to use cin and cout commands in a program , we used to write :                                  #include <iostream.h> In the similar way , for taking input from user in JAVA , Scanner class is used and this is contained in in-built package      util .  We will see how scanner method is used :                                                         import java.util.*;          ...

Monday, 9 June 2014

Flow Controls in JAVA

CONDITIONAL STATEMENTS :  IF STATEMENT :                        SYNTAX :                                             if (condition)                                                   {                                                    ------ ;                    ...

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes