Page 280 - COPA VOL II of II - TP -Punjabi
        P. 280
     IT ਅਤੇ ITES (IT & ITES)                                                                      ਅਭਿਆਸ  1.39.07
       COPA - JAVA ਭਿੱਚ ਚੋਣਿੇਂ ਮੋਡੀਊਲ II ਪ੍ਰੋਗ੍ਾਭਮੰਗ
       ਸਕੈਨ੍ ਕਲਾਸ ਦੀ ਿ੍ਤੋਂ ਕ੍ਦੇ ਹੋਏ ਕੀਬੋ੍ਡ ਤੋਂ ਟੈਕਸਟ ਪੜਹਰੋ ਕੰਸੋਲ ਕਲਾਸ ਦੀ ਿ੍ਤੋਂ ਕ੍ਦੇ ਹੋਏ ਕੀਬੋ੍ਡ ਤੋਂ ਟੈਕਸਟ
       ਪੜਹਰੋ (Read text from the keyboard using scanner class read text from keyboard
       using console class)
       ਉਦੇਸ਼ : ਇਸ ਅਭਿਆਸ ਦੇ ਅੰਤ ਭਿੱਚ ਤੁਸੀਂ ਯੋਗ ਹੋਿੋਗੇ
       •  ਸਕੈਨ੍ ਕਲਾਸ ਦੀ ਿ੍ਤੋਂ ਕ੍ਦੇ ਹੋਏ ਕੀਬ੍ੌਡ ਤੋਂ ਟੈਕਸਟ ਪੜਹਰੋ।
          ਲੋੜਾਂ (Requirements)
          ਔਜ਼ਾ੍/ਉਪਕ੍ਨ/ਯੰਤ੍ (Tools/Equipment/Machines)
          •   ਇੱਕ ਕੰਮ ਕਰਨ ਿਾਲਾ ਪੀਸੀ, ਇੰਟਰਨੈਟ ਕਨੈਕਸ਼ਨ, ਟੈਕਸਟ ਐਡੀਟਰ, ਬ੍ਰਾਊਜ਼ਰ ਅਤੇ ਜਾਿਾ JDK                                    - 1 No. / trainee
       ਹੇਠਾਂ ਦਭੱਤੇ ਕੋਡ ਦੀ ਪਾਲਣਾ ਕਰੋ: -
                                                    SOURCE CODE
                 import java.util.*;
                 class UserInputDemo
                 {
                 public static void main(String[] args)
                 {
                 S c a n n e r  s c =  n e w  S c a n n e r ( S y s t e m . i n ) ;  / / S y s t e m . i n  i s  a  s t a n d a r d  i n p u t  s t r e a m
                 int a= sc.nextInt();
                 System.out.print(“Enter second number- “);
                 int b= sc.nextInt();
                 System.out.print(“Enter third number- “);
                 int c= sc.nextInt();
                 int d=a+b+c;
                 System.out.println(“Total= “ +d);
                 }
                 }
        Fig 1
       266
     	
