Skip to main content

Posts

Showing posts with the label Hello World

Hello World : Backbone.js

Firstly, a brief introduction about Backbone.js. Backbone.js is a very light weight javascript framework which allows you to organize your code in a MVC fashion. In conventional methods we use to keep on adding javascript code in the jsp or in separate js files at first this method looks simple and well organized but afterwards it's a pain to keep the code organized. Here backbone.js comes to rescue. It avoids all Javascript spaghetti and let you arrange your code in MVC fashion i.e. you have Model, View and Controller. Model : This basically let you retrieve the data and populates it. View : It's nothing but what you will be showing on GUI (Graphical User Interface). Controller : In this case it lets you save the state of the application via a hashback URL. We will have more information on the Controller in later post. For now, let's just concentrate on Hello world program. Backbone.js allows you to develop a single page application that means there is a singl...

Java Hello World program

Before starting working with java I am assuming that you have jdk installed on your local machine. You can start writing java program using a notepad. Below are the steps for writing hello world program in java : 1) Create a file and rename it to HelloWorld.java 2) Open the above file and put the blow code in it 1| public class HelloWorld 2| { 3|   public static void main(String args[]) 4|   { 5|       System.out.println("Hello World"); 6|   } 7| } 3) Save the file. 4) Open a command prompt go to the location where u have saved this file and run the following command : C:>javac HelloWorld.java 5) This should run successfully with no errors. 6) Now run it using below command : C:>java HelloWorld 7) This should run successfully and should show you "Hello World" message on command prompt. 8) Congrats you are done with your first java program. Description : Line No.1 It's the declaration of a class. pub...