Saturday, 29 March 2014

You can launch your Java project by just double clicking the jar file of the project. For that you have create the jar file first. Don't worry you don't have to download additional tools for that purpose it can be done using Eclipse.

If you don't have Eclipse you can download it for your platform HERE
If you don't have JDK you can download it free for you OS HERE

Here is the step by step method to create Executable Jars using Eclipse :

  • Right Click the project from which you want to create jar file 

  • Click Export 
  • Choose Export destination as Java 
  • Select Runnable JAR file  under Java 
  • Select a Launch configuration i.e select the main class 
  • Select the destination where u want to create JAR file
  • Select Extract required libraries into Generated JAR file under Library Handling  

  • Click Finish

Hope You liked this post FOLLOW ME For more HAPPY CODING :)

Monday, 24 March 2014

Java is extremely powerful and Easy Language. But don’t misunderstand its easy but powerful and popular language. It is a must learn programming language for you weather you want to develop web Applications or desktop Applications. It is also good for you if you are willing to develop for mobile phone. Java is Ideal choice for everyone.

Lest's check  the reasons behind Java's success and why it is the first choice for every programmer in application development market.
1 : Its Easy to Learn  :
Java is the easiest programming language to start with. Believe me if you are a beginner you are gonna love its syntax as it is quiet easy and almost same to the natural language. Beginners can learn and understand  a lot faster as compared to C++. The syntax of Java is easy to remember so the beginners do not have to waste a lot of their time in learning the complicated syntax unlike C++ so beginners can give more time for learning programming rather than learning the syntax. Java is free and it is object Oriented.
2 : Platform Independent and Powerful development tools :
Java introduced the concept of WORA(Write Once Run Anywhere)which is One of the biggest reasons of Java’s success. You can develop on one platform and can run it on many others which saves a lot of time and effort. But JRE(Java Runtime Environment) should be installed on the target platform first. You can get latest version of JRE for your platform at Oracle Website.
Java has powerful development tools like Eclipse , NetBeans and IntelliJ.
3 : 3rd Party Support:
Many other companies support Java. Java supports Android application an OS development (which attracts mobile developers). It can also easily integrate with databases like MySQL. Web pages can also be created using Java. GWT(Google Web Toolkit) supports java to create web pages. Java is also used to create dynamic webpages and Server side Applications(JSP's and Servlets).
4 : Highly in Demand :
JAVA is highly in demand by employers and its not going end up soon due to its advanced features and ease of usage. Most of the applications developed now a days are coded in Java. 
Java developers are more likely to get a good job as compared to C++ developers. As mentioned above java has 3rd party support which makes it much more popular as compared to other programming languages.
5 : Free notes plus free IDE's :
Java have a lot of online support and free notes are available in thousands of websites. It also has the better IDE's than others like Eclipse EE ,Net Beans. And all of that for Free!!! 
6 : Java is an All Rounder :
You can do anything using Java you can create web pages and web applications using Java. Java is also a must learn if you want to develop mobile applications. You can create Databases using Java. You can create games with high quality graphics. There is nothing which you can not do with java.  Java is fun And i Bet you will never feel tired of Java.

If You Liked my Post FOLLOW ME for more stuff  :) !!!

Saturday, 22 March 2014

The biggest problem a beginner faces is the problem of Logic Developing. Many of Beginners do not have too much creative thinking. Today i m going to share with you the techniques which i used to strengthen my logic in programming and  they helped me a Ton. Believe me you are going to love them.
Know what you are doing 1 : Most of the beginners just want to make their code run rather then thinking of logic behind it. Trust me you are not going to learn anything if you continue doing this.The better way is to break your problems into pseudo code and then try to implement each line of pseudo code into the program.
Read Other programmer’s Code 2 : Obviously I am not asking to copy other programmer’s code always use your own methods. But after developing your own logic for a problem try to compare that with other’s programs. You can learn a lot by doing this.
Challenge Your Skills 3  : Keep testing and Challenging yourself on a regular basis. Try to do something new and challenging whenever you find time. Your quest for knowledge should never end.
Challenge The Rules 4 : Always keep challenging the rules of the language for example java does not allow constructor overriding. Think that why the developers chose not to allow constructor overriding. What problems would arise if it was allowed? and what are the possible benefits if it is allowed?
Understand The Algorithms 5 : Try to understand the algorithms you find on the internet and write code for them by yourself rather than copying code from the internet some example algorithms are Bubble Sort , Array Reversing , Even or odd functions , drying shapes using asteriks and loops and many more.
Teach others and Discuss 6 : Teaching others will help you a lot to review the things you skipped and its also going to make you much more confident of what you can do. 
Write Your Own Code 7 :  Always try to develop your own logic don’t copy code from the internet, internet should always be your last option.
Never Lose Heart 8 : A large number of beginners fail to become a successful programmer because they are impatient and lose heart too early. So Never even think of giving up just keep trying and you will see the improved version of yourself everyday.

Hope this helped. If there are some other tips which worked for U comment below and and   FOLLOW ME for more  :) !!!

Thursday, 20 March 2014

 Have you ever thought about what if you could know the time taken by your code to run. That's what todays post is all about.

Knowing the speed of your program or algorithm is very important. Because that's the only way to make it better and faster. Today i am going to show you how you can calculate the running time of your program.
     For doing this you first need to include the header file "time.h". Then declare two variables of "time_t" type i.e "time1" and "time2". Save the current time in variable time1(time (&time1);) then at the end of the program again save the value of current time this time in "time2"(time (&time);). Then call the method "difftime(time2,time1);"  like this. And this will return you the time taken in seconds.
      Similarly if you want to calculate the time for a specific method save the current time before and after the method and call the function "difftime()".

#include <stdio.h> #include <time.h> #include<conio.h> #include<iostream.h> void main (void) { clrscr(); int sum,a,b; time_t time1,time2; double dif_sec; time (&time1); cout << "Enter the value of a :"<<endl; cin >> a; cout << "Enter the value of b :"<<endl; cin >> b; sum = a + b; time (&time2); dif_sec = difftime (time2,time1); cout << "\nThe sum is : " << sum<<endl; cout << "\nIt took you " << dif_sec << " seconds to enter the numbers and calculate the sum"<<endl; cout << "Press Any key to Continue....."; getch(); }

Output :

If you like my post Comment below and subscribe for more :) !!!

Wednesday, 19 March 2014

To understand this first you need to know why do we create static methods and how do we call them learn about static methods at :
Main method is declared static because static methods do not need any instance to get themselves called. Java is Object Oriented language so it is necessary to declare the  main method as static because their are some conditions in which we don’t want to create the object for example if we want to do simple programming without using Concepts of OOP then their is no way to call the main method but by declaring it static. The code below will help you understand.
  public class MyClass{
public void main(String arguments[]){
The above code generates an error: main method is not static please define the main method as:
   public static void main(String[] args)
But when the main is made static this code runs fine and gives the output:
          If you find my answer interesting and easy to understand invite your friends to read this and Don’t Forget to Like and give your feedback and suggessions and FOLLOW me for More :)!!

Tuesday, 18 March 2014

Today i m going tell you how you can calculate your typing speed using Java code
Here is the Code :

 import java.util.Scanner;  
 public class TypingSpeedCalculator {  
  int no_of_words=0;  
  static int z;  
  double minutes;  
  double start,end;  
 public int count_Words(){  
 int a=1;  
 String b;  
 Scanner s1 = new Scanner(;  
 System.out.println("Type some text : ");  
 start = System.currentTimeMillis();  
 b = s1.nextLine();  
 end = System.currentTimeMillis()-start;  
 minutes = end/60000;  
 for(int i = 0;i < b.length();i++){  
  if(b.charAt(i) == ' '){  
  a = a + 1;  
 no_of_words = a;  
 return a;  
 public void typing_Speed(){  
  double a = 0;  
  a = no_of_words/minutes;  
  System.out.println("Your typing Speed is "+a+" WPM");  
 public static void main(String args[]){  
  TypingSpeedCalculator ui=new TypingSpeedCalculator();  
  System.out.println("\nOutput : \n");  

  Hope you Liked this. FOLLOW me for more awesome stuff!!! 

Get Your Programming Related Problems SOLVED

Subscribe to RSS Feed Follow me on Twitter!