• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
projectsgeek

ProjectsGeek

Download Mini projects with Source Code, Java projects with Source Codes

  • Home
  • Java Projects
  • C++ Projects
  • VB Projects
  • PHP projects
  • .Net Projects
  • NodeJs Projects
  • Android Projects
    • Project Ideas
      • Final Year Project Ideas
      • JSP Projects
  • Assignment Codes
    • Fundamentals of Programming Language
    • Software Design Laboratory
    • Data Structure and Files Lab
    • Computer Graphics Lab
    • Object Oriented Programming Lab
    • Assembly Codes
  • School Projects
  • Forum

Java Programs

April 3, 2012 by ProjectsGeek Leave a Comment

                   Java Programs
Applets
Small programs designed to add interactivity to Web sites
Downloaded with the Web page and launched by the Internet browser

Servlets

Run by Web server on the server
Typically generate Web content

Applications

Programs that run standalone on a client
Developing a Java Program 

Write the source code

  • Using an Integrated Development Environment (IDE) or text editor. Save in a .java file
Compile the source code:          javac ClassName.java
  • Creates .class file
Execute the application:         java ClassName
  • Run by the Java Virtual Machine

Sample Program

 // FirstProgram.java  
  public class FirstProgram  {  
   public static void main( String [] args )  
   {  
     System.out.println (“Java Program”);  
   }  
  }  

C:\ javac FirstProgram.java
C:\java FirstProgram
Java Program

The first line of the program uses the keyword class to declare that a new class is being defined.
A class is Java’s basic unit of encapsulation.
FirstProgram is the name of the class.

The class definition begins with an opening curly brace { and ends with a closing curly brace }

All program activity occurs within a class.

The next line of the program begins the main() method.
This is the line at which the program will begin executing.
All Java applications begin execution by calling main(). Just like C and C++
Statements and expressions are similar to those in other languages, and in most cases, identical to those of C or C++.

 

Java Programs 3

Other Projects to Try:

  1. First Program in Java
  2. Public and Private Keywords
  3. Java Tutorial for beginners – Introduction to Java
  4. Introduction to Java
  5. Assembly Programs

Filed Under: Java Projects Tagged With: Java Projects

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Tags

.Net Projects Download Android Project Ideas Android Projects Angular 2 Assembly Codes C # Projects C & C++ Projects C++ Projects Class Diagrams Computer Graphics Database Project Data Mining Projects DataScience Projects Datastructure Assignments Download Visual Basic Projects Electronics project Hadoop Projects Installation Guides Internet of Things Project IOS Projects Java Java Interview Questions Java Projects JavaScript JavaScript Projects java tutorial JSON JSP Projects Mechanical Projects Mongodb Networking Projects Node JS Projects OS Problems php Projects Placement Papers Project Ideas Python Projects seminar and presentation Struts

Search this Website


Footer

Download Java Project
Download Visual Basic Projects
Download .Net Projects
Download VB Projects
Download C++ Projects
Download NodeJs Projects
Download School Projects
Download School Projects
Ask Questions - Forum
Latest Projects Ideas
Assembly Codes
Datastructure Assignments
Computer Graphics Lab
Operating system Lab
australia-and-India-flag
  • Home
  • About me
  • Contact Form
  • Submit Your Work
  • Site Map
  • Privacy Policy