शुक्रवार, 17 अप्रैल 2026

JAVA Programming



JAVA Programming


Write a program in any editor like Notepad 
Example 1
class Sum
{
    public Static void main(String[] args)
    {
        int a=5, b=10;
        System.out.println("Sum="+(a+b));
    }
}
with proper case, and tab and punctuation mark 
now save the file with name sum.java in drive e: and subdirectory name is java 
as you know file name is name of the class, so here class name is sum so i give the name of the file.
 
Now you run this file in command prompt 
c:\>e:
e:\>cd java 
e:\java>javac sum.java
e:\java>java sum
Sum = 15















































कोई टिप्पणी नहीं:

एक टिप्पणी भेजें

Fundamentals Of Computer Notes

  UNIT – I परिचय. कम्प्यूटर एक ऐसा यंत्र है जो दषकों की यात्रा सम्पन्न कर आज अपने इस रूप में उपलब्ध है जिसकी तुलना मानवीय षरीर की रचना से ...