Skip to main content

Posts

Session 1 Java Theory

For you guys I have made a PDF file in which basic theories of JAVA are given it is the 1st Part 2nd Part will be coming soon. Download the PDF now by clicking the button below. Download The PDF
Recent posts

Basic Program: WAP to print difference of 20 &60

Print Difference of 20&60 import java.util.*; class java { public static void main() { int a,b,c; a=20; b=60; c=a-b; System.out.println(c); } } Explanation:- Packages:- 1. import java.util 2. public static void main() Defining Class 1. class java:- it is used to define class in JAVA 2. (;) to end the specific line 3. System.out.println(c): to give the output of the program 4. "{" it is for opening the program 5. "}" used to close the program

Basic Program: WAP to print the sum of 20 and 50.

Wap to print the sum of 20 and 50 import java.util.*; class java { public static void main() { int a,b,c; a=20; b=30; c=a+b; System.out.println(c); } } Output 50 Data Type used:- Integer- int Operator used:- Addition- (+) Explaination 1. From import java.util to public static void main() it is a package except the bracket. 2. Class is used to define the class which we are using example class java. 3. Opening brackets are used to give instruction to the program that the particular program is starting from where and ending where 4. System.out.println() is used to give the output. 5. System.out.println(c): the C inside the bracket is the specific output like a=40 b=30 c=a+b It defines that where the program is executing. I can be d also depending on the program which we are doing. 6. (;) is used to confirm the program that the specific line is ending System.out.println();

Data Types and Arithmetic Operators

For starting java programming we should know some operators at first you should know basic operators 1. Data Types 2. Operators a. Arithmetic Operators b. Relational Operators c. Logical Operators d. Unary Operators e. Assignment Operators 1. Data Types:- Data Types are the defined storage format that a variable can store to perform some specific operations. Each data types uses Java Keywords to be characterized. To utilize maximum amount of memory, Java provides a large number of Data Types. Data Types:- 1. Integer- int 2. Fractional- float, double 3. Character- char 4. Boolean- boolean Arithmetic Operators:- It is used to perform basic arithmetical operations such as addition, substraction, etc. Some Arithmetic Operators Addition- (+) Substraction- (-) Multiplication- (*) Division- (/) Modulus- (%) Modulus is used to find remainder.

Phase 1:- Practical And Therory

1. Theory a. Object Oriented Programming b. Introduction To Java And BlueJ 2. Practical 1. Basic Program 2. Input Programs using Scanner 3. For Loop 4. While Loop 5. Do-While Loop 6. Nested Loop(Pattern Programming) 7. Input Inside Loop 8. Input Outside Loop 9. Input through parameter 10. Switch-Case Programming Important:- We will be completing our phase 1 by use import java.util.*; library. Use BlueJ and jdk 7.1 for programming

Softwares for JAVA

For running any program we always need a compiler be it java, c++, Basic, Python, etc. So I am providing you the best software 1. jdk- it is the main compiler for the java program. Link:-  Click To Redirect 2. BlueJ- It is the best GUI compiler for this you have to install jdk because it is the main compiler. BlueJ makes the UI more user friendly. It can run in 1GB Ram devices also. Download only the latest version Link:-  Click to redirect User Interface