[Go to site: main page, start]

0% found this document useful (0 votes)
3 views3 pages

Java Notes

The document provides an overview of binary number conversion for whole numbers and key concepts in Java programming, including definitions of classes, objects, and the four main parts of Object-Oriented Programming (OOP). It outlines important programming elements such as values, tokens, keywords, identifiers, variables, constants, and expressions, along with examples and explanations. Additionally, it mentions data types and the significance of Integrated Development Environments (IDEs) in Java programming.

Uploaded by

Ananya Gupta
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Java Notes

The document provides an overview of binary number conversion for whole numbers and key concepts in Java programming, including definitions of classes, objects, and the four main parts of Object-Oriented Programming (OOP). It outlines important programming elements such as values, tokens, keywords, identifiers, variables, constants, and expressions, along with examples and explanations. Additionally, it mentions data types and the significance of Integrated Development Environments (IDEs) in Java programming.

Uploaded by

Ananya Gupta
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Java

Binary Numbers- 0,1

Conversion of whole numbers to binary numbers-:


Whole Number Binary Number

0 0

1 01

2 10

3 11

4 100

5 101

6 110

7 111

8 1000

9 1001

10 1010

11 1011

12 1100

13 1101

14 1110

15 1111

Important Definitions-:
# Class- Blueprint of programming logic/object. Class has 2 components-:

1. Data member (variable)


2. Member Function (method)

# Object- Real implementation of class. An object has 2 components-:

1. Characteristics
2. Behavior

# Four Parts of OOPs are-:

1. Data Abstraction- Representation of essential features of system. Eg- laptop (we see
laptop model, processor speed, memory slot and avoid other features)
2. Data Inheritance- Property by which one class acquires the properties of another class.
Eg-
Mammal Animal Dog
3. Data Encapsulation- Binding of code and data together. Eg- While purchasing a car,
we do not purchase its spare parts but rather the whole car as a unit.
4. Polymorphism- Poly means “many” and morph means “forms”. It is the tendency to
exist in more than one form.

# Values- Data passed to a program.

# Tokens- Basic element of java programming. Eg- Identifier, operator, keyword, variable,
constant, punctuator/separator.

# Keywords- Reserved words in Java compiler which have some specified meaning. Eg- int,
float, static, void, main etc.

# Identifiers- Used to name variable, method, class, package and interface.

# Variable- int a=5. In this ‘a’ is a variable.

# Constants- Whose values do not change. These are 6 types of constants-:

1. Integer Constant
2. Floating Constant
3. Character Constant
4. String Constant
5. Null Constant
6. Boolean Constant

# Expression- Sequence of operator and operand. There are 4 types of expressions-:

1. Arithmetic Expression- Used to perform mathematical calculation.


2. Integer Expression
3. Real Expression
4. Mixed Expression
The value of the operands is like this highest to lowest-

% / * + - (They also vary from left to right)

Eg- Solve 5+4%2-3+9/3*4

Answer-

5+4%2-3+9/3*4

= 5+0-3+9/3*4

=5+0-3+3*4

=5+0-3+12

=5-3+12

=2+12

=14

# IDE- Integrated Development Environment

# Java- Case Sensitive

# &- Ampersand

# Examples of Data Type are-:

1. Int
2. Float = 4 byte
3. Double = 8 byte
4. String
5. Char

int x = 65 ;

Variable Value
Data Type
(basically tells
which type if
data a variable
will store)

You might also like