Tuesday, 27 September 2016

CORE JAVA LAB@HOME 1 ~ GNIITHELP

Answer:- 1.Open a command or terminal window if you are using Windows O.S. a. Click on start button. b. Click on run. c. Type cmd in run dialog box and the OK button. 2.Execute the java -version command. This verifies that the JRE is installed and not JDK. 3.Execute the javac -version command. This verifies that the JDK is installed. 4.Start NetBeans...
Read More »

CORE JAVA LAB@HOME 2 ~ GNIITHELP

Answer-1 public class Reservation { int ticketID; String name; String source; String destination; Reservation()   {  ticketID = 80;  name ="Harry";  source = "Chicago"  destination = "Dallas"; }public void showTicket ()  {         System.out.println("The Ticket ID is "+ ticketID);         System.out.println("The Passenger Name is "+ name);         System.out.println("The...
Read More »

CORE JAVA LAB@HOME 3 ~ GNIITHELP

Answer-1 class PrimeNumbers {    public static void main (String[] args)    {        int i =0;        int num =0;        //Empty String        String  primeNumbers = "";        for (i = 1; i <= 100; i++)                 {                  int counter=0; ...
Read More »

CORE JAVA LAB@HOME 4 ~ GNIITHELP

Answer-1 Click Here Answer-2 public class rectangle {    double length;    double breadth;   public rectangle ( double len , double brd) {      length = len;      breadth = brd;    public boolen equals (object obj) {     rectangle rec  = (rectangle) obj;    if (this. length == rec.length && this.breadth == rec.breadth) {         return true;  ...
Read More »