Tuesday, October 8, 2024

tarif shyari original

तेरी मुस्कान, तेरी आँखें, तेरी अदाएं..
खुशनसीब है वो शक्स जिस पे हो तेरी निगाहें

Sunday, June 2, 2013

Fourteen Using Multiple Classes

//make two class
//You have to run blue colored class i,e FourteenUsingMultipleClasses
class FourteenUsingMultipleClasses {

    public static void main(String[] args) {

       
        RefForTutorialThirteen RefForTutorialThirteenObject
        =
        new RefForTutorialThirteen();
       
        RefForTutorialThirteenObject.simpleMessage("ji");
       
             
       
    }

}


public class RefForTutorialThirteen {

    public void simpleMessage(String name){
     System.out.println("Hey " + name + " Please Join us.");
   
    }

    private String girlName;
    public void setName(String name){
        girlName = name;
       
       
    }

    public String getName(){
       
       
        return girlName;
       
    }
   
    public void saying(){
       
        System.out.printf("Ohh its Wonder %s",getName());
       
       
       
    }




}


Out put is
Hey Hall berry  Please Join us.

Thirteen WhileLoop

class ThirteenWhileLoop {

 
    public static void main(String[] args) {
   

    int counter = 0;
   
    while (counter < 14){
       
        System.out.println("Hey till now I Covered  "  + counter + " Vedio Tutorial");
        counter ++;
        System.out.println("its great");
       
       
    }
       
       
    }
//out put

Hey till now I Covered  0 Vedio Tutorial
its great
Hey till now I Covered  1 Vedio Tutorial
its great
Hey till now I Covered  2 Vedio Tutorial
its great
Hey till now I Covered  3 Vedio Tutorial
its great
Hey till now I Covered  4 Vedio Tutorial
its great
Hey till now I Covered  5 Vedio Tutorial
its great
Hey till now I Covered  6 Vedio Tutorial
its great
Hey till now I Covered  7 Vedio Tutorial
its great
Hey till now I Covered  8 Vedio Tutorial
its great
Hey till now I Covered  9 Vedio Tutorial
its great
Hey till now I Covered  10 Vedio Tutorial
its great
Hey till now I Covered  11 Vedio Tutorial
its great
Hey till now I Covered  12 Vedio Tutorial
its great
Hey till now I Covered  13 Vedio Tutorial
its great

Twelve Switch Statement

import java.util.Scanner;



class TwelveSwitchStatement {

    /**
     * @param args
     */
    public static void main(String[] args) {
       
        System.out.println("Hi which day's Menu you want");
        Scanner santosh = new Scanner(System.in);
       
        String day;
       
        day = santosh.next();
        switch(day){
       
        case "Monday":
            System.out.println("I can prefer Alu Gobhi ");
        break;
       
        case "Tuesday":
            System.out.println("I can prefer Alu Mutter ");
        break;
       
        case "Wednesday":
            System.out.println("I can prefer Baigan ");
        break;
       
        case "Thursday":
            System.out.println("I can prefer Patta Gobhi ");
        break;
       
        case "Friday":
            System.out.println("I can prefer Gajar ka Halwa ");
        break;
       
        case "Saturday":
            System.out.println("I can prefer My wife's kiss ");
        break;
       
        case "Sunday":
            System.out.println("ohh weekend Its time to Candle light dinner ");
        break;
       
       
       
       
        default:
            System.out.println("Pl write days like");
            System.out.println("Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday");
       
        }
       
       
       
       
    }

}
// Opt put 

Hi which day's Menu you want
Monday
I can prefer Alu Gobhi

Eleven Logical Operation


import java.util.Scanner;


class ElevenLogicalVariable {

   
    public static void main(String[] args) {
   
           
            Scanner santosh = new Scanner(System.in);
               
           
           
            int girl;
            int boy;
            System.out.println("Please Put Age of Girl");
            girl = santosh.nextInt();
           
            System.out.println("Please Put Age of Boy");
            boy = santosh.nextInt();
           
           
           
            if (girl >= 18 && boy >= 21)
            {
                System.out.println("You Can Marry");
            }
            else
            {
                System.out.println("You can't Marry Please Wait for  The Right time");
            }
    }

}
// out put
Please Put Age of Girl
18
Please Put Age of Boy
21
You Can Marry

Ten If Statement

import java.util.Scanner;

class TenIfStatement {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
       
       
        System.out.println("Please type 9 ");
        Scanner Santosh = new Scanner(System.in);
        int test;
       
        test = Santosh.nextInt();
       
       
       
        if (test == 9){
           
            System.out.print("Oh good your You typed correctly ");
            }
        else{
            System.out.print("Contition is flase boss its not = 9 ");
        }
           
           
       
       
       
    }

}
==================Out put ==========================

Please type 9
9
Oh good your You typed correctly


Please type 9
10
Contition is flase boss its not = 9

Nine Increment and Decrement Operator

import java.util.Scanner;



class NineIncrementdOperator {

    public static void main(String[] args) {
       
        Scanner bucky = new Scanner(System.in);
       
        int Increment =5;
       
        int Decrement =5;
       
        Increment ++;
        System.out.println( Increment);// here value of Increment is 5+1 = 6
       
        ++Increment;
        System.out.println(Increment); // here value of Increment is 7
       
       
        Decrement --;
        System.out.println(Decrement);// here value of Increment is 4
       
        --Decrement;
        System.out.println(Decrement); // here value of Increment is 3
       
        Increment += 8; // adding 8 to variable
        System.out.println(Increment); // here value of Increment is
               
        Increment *= 8; // Multiply 8 to variable
        System.out.println(Increment); // here value of Increment is 120
       
        Increment /= 8; // divide 8 to variable
        System.out.println(Increment); // here value of Increment is 120 / 8 = 15
       
        Increment %= 8; // remainder 8 to variable
        System.out.println(Increment); // here value of Increment is 15 % 8 = 7
    }

}

===============Out put ===========================
6
7
4
3
15
120
15
7