Java code,java,Example,Tutorials,Syntax,Hibernate,Jsp, Servlet, FileHeadling,Java or Core Java Tutorial or Java Programming Tutorial is a widely used robust technology. learning of java from basic questions like what is java tutorial, core java, where it is used, what type of applications are created in java and why use java.

Search This Blog

Saturday, 30 July 2016

BasicSynatx







What is java And Write the Syntax of java and they case?


Class classnam(a)
{
                                                 Public static viod main(String art[])
   {


                    //code

  //method
   }
}
javaSyntax

Share:

JAVAHELLOWORD

helloword

JavaSimple code ?

abstract

        In front of a `class` keyword, prevents this class to be directly instantiated. In front of a method               signature, allows the implementation of this method to be deferred to an inheriting class.

assert

Assert describes a predicate (a true–false statement) placed in a java-program to indicate that the developer thinks that the predicate is always true at that place. If an assertion evaluates to false at run-time, an assertion failure results, which typically causes execution to abort. Optionally enable by ClassLoader method.

boolean

Defines a boolean variable for the values "true" or "false" only (NB: "null" as in class Boolean is not allowed).

break

Used to end the execution in the current loop body.

class

A type that defines the implementation of a particular kind of object. A class definition defines instance and class fields, methods, and inner classes as well as specifying the interfaces the class implements and the immediate superclass of the class. If the superclass is not explicitly specified, the superclass is implicitly Object. The class keyword can also be used in the form Class.class to get a Class object without needing an instance of that class. For example, String.class can be used instead of doing new String().getClass().

const

Although reserved as a keyword in Java, const is not used and has no function.[2][1] For defining constants in java, see the 'final' reserved word.

Share:

SaveJavaFile


How to Save Java File ?

savefile ,javafile stepfile
ReadMore
showVideo
Download
Share:

Tuesday, 26 July 2016

What is Variable in java


what is Variable in java?
   
                A variable can provide to store the program each of the java Variable has type .
this type is determines the size and layout of the variable memory  .and also the rang of value is store the memory .

variable in java,use of variable and how to define variable in java

What is Variable?type of Variable?


Main Three type of Variable .
                                           Local Variable
                                            StaicVariable
                                           instance Variable
                                  



Local variables:


What is Variable?Explain LocalVariable?
 Example,LocalVriable


Class/static variables:

Class Variable in java and Explain the Details .

Static variable ues of Static variable in java 
code the class variable

import java.io.*;

public class vipul{
  
   private static double salary;

   // DEPARTMENT is a constant
   public static final String DEPARTMENT = "Development ";

   public static void main(String args[]){
      salary = 1000;
      System.out.println(DEPARTMENT + "average salary:" + salary);
   }
}

Instance variables:

  • Instance variables are declared in a class, but outside a method, constructor or any block.
  • When a space is allocated for an object in the heap, a slot for each instance variable value is created.
  • Instance variables are created when an object is created with the use of the keyword 'new' and destroyed when the object is destroyed.
  • Instance variables hold values that must be referenced by more than one method, constructor or block, or essential parts of an object's state that must be present throughout the class.
  • Instance variables can be declared in class level before or after use.
  • Access modifiers can be given for instance variables.
  • The instance variables are visible for all methods, constructors and block in the class. Normally, it is recommended to make these variables private (access level). However visibility for subclasses can be given for these variables with the use of access modifiers.
  • Instance variables have default values. For numbers the default value is 0, for Booleans it is false and for object references it is null. Values can be assigned during the declaration or within the constructor.
  • Instance variables can be accessed directly by calling the variable name inside the class. However within static methods and different class ( when instance variables are given accessibility) should be called using the fully qualified name . ObjectReference.VariableName.

 



Share:

Monday, 25 July 2016

Setp TO Run Java Program

how to Run java Code wtih demo?
    they Follws many Setp .

 Setp-1
      First Setp is Open Cmd Commant Promt .


Setp-2 After that Check Your JDK is Install or not so Write Comment JAVAC .




Setp-3 Message is come this tpye than Understand the Java Jdk is Install otherwise
          you  need to Install form you pc or Laptop After Follows this Setp.



Setp-4 After Cls Commant to Clear youe CMD and Write JAVAC Comment that Commant is Used
             to Complie your javacode.  to Create the class FILE of CODE and RUN them.

                   


Setp-5 Now Compile youe code than wite only Java And CLASS Name Like A
          Any Eorro is Come than it Dispaly and Slove it not any Error than Run Successfull.

       

Setp-6    Final Not Any Error in your Code then output is see in CMD comment.



Alll THE BEST








Share:

java is Robust with Dymanic and Hight Performance with Multithreaded


Java is Dynamic and High Performance?also is java is Distributed and Multithreaded?\
   java is Robust,MultiThreading,Interaded ,HighPerfomance

Share:

Sunday, 24 July 2016

java features with why java is robust and secure?


what is Features od java? And Why java is secure and Paltform independent?
      
Share:

Saturday, 23 July 2016

java History with Deatils


what is java and where it produce and who is produce?



    java is first use to devloped A Electronic Divice and After that java is is to Programing Laguage and devoloped diffrent type os Website and GAME  and  java is OPEN SOURCES OS ALL

Share:

Friday, 22 July 2016

Java Syntax with some Importance


what is Java Syntax and Important of Syntax in java?



Share:

Thursday, 21 July 2016

How to set Path of java JDK and How To run java code


How to set Path of java jdk and Run the Java Program with simple demo?


              After the Dwonload jdk or java softwer than After we need to set the java path before java code is not run in NetBeans or Ecilps .
             Setting of the Path os Windows and than set the path and Access java code any Error than come with hight light and also Huamn can Easly slove the Error of Java Code How Has Knowlege of java Laguage.
       
                     
Share:

Tools of Java And Use of Tools


What is Tools of JAVA and Why We needs of Tools?

        java is a programing Language and also that is different type of tools to perform the platform
and also java is Many type of tools is available to use a java Programing ans Basic are list out under they most of use today

---------------- javaJdk 8
-----------------jdk6.0
----------------jdk7.0
-------------------jdk all version


they are Accress to 64MB OF  RAM
---------------128 MB RAM

Share:

Tuesday, 12 July 2016

java syntax

javaSyntax
Syntax Of Java And Example with Syntax?


class one
{
   public static void main(string are[])
   {
     public void one()
     {  int i,j;
    if(i==j)
             {
              int j=6;
             }
  System.out.println(j);
       }
   }
}
Share:

Monday, 11 July 2016

Servlet Request and Response

What is servlet ?


Share:

Saturday, 9 July 2016

What is Packages

What is Packages?with Example.


How to Creating Packages?with Help?
Share:

Thursday, 7 July 2016

What is Java and That Programming Environment ?

What is Java and That Programming  Environment ?
                      
                   java is a Programming Language.they also known as oak.

  
javaEnviroment javaProgramming javacode

Share:

what is Existing Packages?
Share:

Wednesday, 6 July 2016

What is java Modifiers?


AccessModifier

What is Modifier in java and List the Categories of Modifier?


There are two types of modifiers in java: access modifiers and non-access modifiers.
The access modifiers in java specifies accessibility (scope) of a data member, method, constructor or class.
There are 4 types of java access modifiers:
  1. private
  2. default
  3. protected
  4. public



private access modifier

                       If you make any class constructor private, you cannot create the instance of that class from outside the class.

                         class vipul{ 
                     private vipul()
                           {
                            }//private constructor 
                           void msg()
                               {
                                     System.out.println("Hello java");
                                 }
                              }
                   public class Simple 
                              {
                                   public static void main(String args[])
                                          {
                                              vipul obj=new vipul();//Compile Time Error  
                                          }
                               }  

default access modifier

      we have created two packages pack and mpack. We are accessing the VIPUL class from outside its package, since VIPUL class is not public, so it cannot be accessed from outside the package.

                     //save by VIPUL.java 
                                       package pack;
                                                      class VIPUL
                                                  {   
                                                                   void msg()
                                                           {
                                                                System.out.println("Hello");
                                                               }
                                                          }  


            //save by Agravat.java 
                         package mpack;
                            import pack.*;
                                     class Agravat
                                            {
                                                 public static void main(String args[]){     
                                                       VIPUL obj = new VIPUL();//Compile Time Error                                                                      obj.msg();//Compile Time Error   
                                                           }
                                                    }  
the scope of class VIPUL and its method msg() is default so it cannot be accessed from outside the package.

protected access modifier

 The protected access modifier is accessible within package and outside the package but through inheritance only.
The protected access modifier can be applied on the data member, method and constructor. It can't be applied on the class.



  //save by VIPUL.java
  package pack; 
               public class VIPUL
                        {
                        protected void msg()
                                {
                                        System.out.println("Hello");
                                   }
                        }  
                               
                      we have created the two packages pack and mpack. The VIPUL class of pack package is public, so can be accessed from outside the package. But msg() method of this package is declared as protected, so it can be accessed from outside the class only through inheritance.

               //save by Agravt.java 
               package mpack;
                     import pack.*;
                         class Agravat extends VIPUL
                                     {
                                      public static void main(String args[])
                                             {
                                                   Agravat obj = new Agravat();    
                                                          obj.msg();   
                                                }
                                          }  
 print "Hello"..........

public access modifier

               
The public access modifier is accessible everywhere. It has the widest scope among all other modifiers.

 //save by VIPUL.java                    package pack;
                 
public class VPIUL
                           {
                                
public void msg()
                                      {
                                        System.out.println(
"Hello");
                                           }
                                  
}
  
//save by Agravat.java                package mpack;
              
import pack.*;                    class Agravat
                             {
                                   
  public static void main(String args[])
                                              {
                                             
   VIPUL obj = new  VIPUL();
                                                   
   obj.msg();
                                               
  }
                                          
}

javacode
  
Share:

What is Identifier In java?List the main Point of Identifier and use.




What is Identifier In java?List the main Point of Identifier and use.

Share:

Java Enums


What is Enums in Java?

ReadMore
Share:

What is Class

What is Class Explain With Example?
 
                        Class is Nothing but it template for object.In simple word class is a pattern which define any of Object.
                    when we create class in java first step we write Keyword Class  and give the name of class.

         class is define in curly Brace {} in between write the java code.

Syntext
     Class NAME OF CLASS
 {
 }

Example
  Class A
{
  // java code
}

  we can Created Multiple class in Single Program.
 Programmer can define nested Class
 

Share:

Tuesday, 5 July 2016

What Is Interface

What Is Interface?

   
      Interface in java is core part of programing,java is advance concept use Interface.it use that use the key word of INTERFACE.
         main use  of interface is java is not support  multiple inheritance so avoid this problem java is use interface but interface is only  Implement it can not extends like class

      we can use multiple interface it must be implement.interface only deceleration part  inside  a  interface

  Syntax
 
    public interface one
 {
     //method name
}
example

  interface one
{

void show();
void disply();
void ex();
}
 
Example of Interface?


    Interface is not a class.
    java is not support multiple inheritance so class is extends it will not implement.
                          so avoid this drawback java is use the interface it can be not Extends .
interface must be Implement .
     EXAMPLE

interface Animal {

   public void eat();
   public void travel();
}
 
 
public class VIPUL implements Animal{

   public void eat(){
      System.out.println("Mammal eats");
   }

   public void travel(){
      System.out.println("Mammal travels");
   } 

   public int noOfLegs(){
      return 0;
   }

   public static void main(String args[]){
      VIPUL = new VIPUL();
      m.eat();
      m.travel();
   }
} 
 
Share:

What Is Interface

What Is Interface?

   
      Interface in java is core part of programing,java is advance concept use Interface.it use that use the key word of INTERFACE.
         main use  of interface is java is not support  multiple inheritance so avoid this problem java is use interface but interface is only  Implement it can not extends like class

      we can use multiple interface it must be implement.interface only deceleration part  inside  a  interface

  Syntax
 
    public interface one
 {
     //method name
}
example

  interface one
{

void show();
void disply();
void ex();
}
 
Example of Interface?


    Interface is not a class.
    java is not support multiple inheritance so class is extends it will not implement.
                          so avoid this drawback java is use the interface it can be not Extends .
interface must be Implement .
     EXAMPLE

interface Animal {

   public void eat();
   public void travel();
}
 
 
public class VIPUL implements Animal{

   public void eat(){
      System.out.println("Mammal eats");
   }

   public void travel(){
      System.out.println("Mammal travels");
   } 

   public int noOfLegs(){
      return 0;
   }

   public static void main(String args[]){
      VIPUL = new VIPUL();
      m.eat();
      m.travel();
   }
} 
 
Share:

java

javaimg
javaset


java


javacopi




Share:

Arrays


What is Array?Different type of Array in OOP.
Array


 Type oF Array

  main Three type of Array are as Under.
  1. One Dimension  Array
  2. Two Dimension Array
  3. Multi Dimension Array

Share:

what is Object,class,Method



What is java ?What is Meaning of Object ,Class,Method,Instance Variables?

Share:

Agravat &Google

Total Pageviews

Blog Archive

vipul c.Agravat . Powered by Blogger.

myjava

myjava
java

myimg

myimg
good

Translate

Recent Posts

Unordered List

Definition List

Pages

Theme Support