28 July 2012

                                                                       Tutorial #2
  Few important properties of java that needs to be learn &   
  understand by all java programmers whether he/she is beginner or
  professional.so here it goes:-

*java is the first programming language that is independent of hardware for its running & work on any configuration or OS(operating system)
      This is mainly because java does-not run on host computer directly,it runs on java virtual machine by converting the program into byte code that are machine independent & that virtual machine converts the byte code according to the configuration requirement type.

*Java does-not use pointers, preprocessor header files,go-to statement & many others .It also eliminate operator overloading that sometime may create chaos in programming.

*Java programs also support functions written in another common languages like C & C++. These functions are called by some special names called as native method.

*java also doesn't include C unique statement keyword sizeof, typedef  & also data type like struct & unions  .Neither do it has include pre-processor directives like #define,#include,#ifdef.
      Instead of this it import statement ,but that use to work much differently than # include as it is attached dynamically at run -time.

*Java also don't have template class as it is present in C++;
                                     
                                                     Overview of Java
 Java in its broad sense has three parts:-
1.J2SE  {Core java + Advance java }
            (that is mainly same as any other primitive language in its rudimentary form like C & C++
             that works as a standalone feature that works on individual computer)
2.J2EE
           (this is mainly for application development that helps in developing website & adding amazing        
             functionality in it )
3.J2ME
           (this mainly helps in developing apps & games of mobile phone & has a great rising market now a
             days when android apps are becoming so popular)

 But for learning any particular branch of java core java of J2SE is very helpful  & must in some sense so we start with learning J2SE.
         Note that :- *java is pure object oriented language unlike C or C++ (which supports both) . So everything we wrote in java must be inside the class.
                            *Also unlike C++ class definition in java doesn't ends with semi-colon(;)
                            * A java application may have any number of classes but only one of them should have main method & program starts from execution of that calls & will end with the execution of that class & if that class links other classes in its body then they intern will also gets executed.
                            * there are three ways of commenting in java
                                      1. // this will allow commenting for only one line;
                                      2. /* comment */ this will allow commenting for more than  one line
                                      3./*comment
                                          *comment continue
                                          *comment continue
                                          */
Lets end this lecture with developing our first programm:-
//This program simply calculate the square-root of first ten natural numbers :-
__________________________________________________________________________
import java.lang.math;
class SquareRoot
{
     public static void main(String args[])
           {
                    double m;
                    double y;
                    for(int i=0;i<=10;i++)
                    {
                              y=Math.sqrt(i);
                              System.out.println("The square root of"+i+" =  "+y);         
                     }

            }
}

_______________________________________________________________________________
The best software for programming java is MyEclipse that can be downloaded from the given below site:-

And tutorial for writing program in MYEclipse can be sen from the given below sites:-


(remaining we will discus in the next tutorial)





15 March 2012

home

This is our first java tutorial lecture

here we are going to see the history of java & just few basic concepts like variable,& assignment of value to variable in java in various different ways
Java is a programming language originally developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture. Java is a general-purpose, concurrent, class-based, object-oriented language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to run on another. Java is currently one of the most popular programming languages in use, particularly for client-server web applications, with a reported 10 million users.

Java Youth Tutorial & Discussion blog

This blog is mainly introduced for helping students to learn java effectively at one site only, without crawling or moving to several waste-fool sites in the hope of learning some-thing new, or clearing the concept that will become the backbone of your future as a java web-developer or in any emerging field of java.