Monday, 21 July 2014

Java program to determine Grade

import java.io.*;
import java.util.*;

class grade
{
   public static void main(String args[])
   {
   
      int n, m;
     
      System.out.println("Enter your name:- ");
      Scanner scanner = new Scanner(System.in);
      String name = scanner.nextLine();
     
      System.out.println("Enter your Class ");
      Scanner in = new Scanner(System.in);
      n = in.nextInt();
     
      System.out.println("Enter your Marks ");
      Scanner out = new Scanner(System.in);
      m = in.nextInt();
     
      if (m>100){System.out.println("Please enter your Actual marks -.- -.-");}
      else if(m>=80){System.out.println("Congrats You Got A Grade");}    
      else if (m>=70){ System.out.println("Congrats You Got B Grade");}
      else if (m>=60){System.out.println("WorkHard! You Got C Grade");}
      else if (m>=50){System.out.println(" Improve Yourself!! You Got D Grade");}
      else if (m>=40){System.out.println(" Improve! You Got E Grade");}
      else if (m<40) {System.out.println("Sorry You Have Failed");}
     
 
}
}

Java Program to Print Date And Time

  1. import java.util.*;
  2. class GetCurrentDateAndTime
  3. {
  4. public static void main(String args[])
  5. {
  6.  System.out.println("Welcome To Date/Time by kidshelp & Computerwizardi");
  7. int day, month, year;
  8. int second, minute, hour;
  9. GregorianCalendar date = new GregorianCalendar();
  10. day = date.get(Calendar.DAY_OF_MONTH);
  11. month = date.get(Calendar.MONTH);
  12. year = date.get(Calendar.YEAR);
  13. second = date.get(Calendar.SECOND);
  14. minute = date.get(Calendar.MINUTE);
  15. hour = date.get(Calendar.HOUR);
  16. System.out.println("Current date is "+day+"/"+(month+1)+"/"+year);
  17. System.out.println("Current time is "+hour+" : "+minute+" : "+second);
  18. }
  19. }

Java Program To Add 2 numbers

  1. import java.util.Scanner;
  2. class AddNumbers
  3. {
  4. public static void main(String args[])
  5. {
  6. int x, y, z;
  7. System.out.println("Welcome!! Program by Kidshelp & Computerwizardi");
  8. System.out.println("Enter two integers to calculate their sum ");
  9. Scanner in = new Scanner(System.in);
  10. x = in.nextInt();
  11. y = in.nextInt();
  12. z = x + y;
  13. System.out.println("Sum of entered integers = "+z);
  14. }
  15. }

Java program To Print Multiplication Tables

  1. import java.util.Scanner;
  2. class TablesbyKidshelp
  3. {
  4. public static void main(String args[])
  5. {
  6. int n, c;
  7. System.out.println("Welcome To Tables by Kidshelp & Computerwizardi");
  8. System.out.println("Enter an integer to print it's multiplication table");
  9. Scanner in = new Scanner(System.in);
  10. n = in.nextInt();
  11. System.out.println("Multiplication table of "+n+" is :-");
  12. for ( c = 1 ; c <= 10 ; c++ )
  13. System.out.println(n+"*"+c+" = "+(n*c));
  14. }
  15. }

Blue J v 3.1.1 free download!!

Hi Friends,
                 Today I have brought Blue J's latest version to you. Its 3.1.1 you can download it from below now!!.
3.1.127 January 2014
Various bug fixes and usability improvements, especially for screen readers.
Bug fixes:
  • Fixed: class type parameters not shown in class diagram
  • Fixed: issues with highlighting, pasting and deleting text in codepad
  • Added: message displayed when no project open, for clarification
  • Fixed: Inspectors could not be moved by dragging them on Mac OS X
  • Fixed: Debian package now recognises oracle-java7-jdk package
Harsh Kumar

Breaking