#club75 - Java Programming class || Class, Object, Method and Functions

in CampusConnect2 years ago (edited)

Good morning dear friends, I am glad we all were opportuned to see today, to God be all glory. So as promised I will formally start my Programming class today, I will try explain in the simplest formate possible. Hope you enjoy it.

Below is today course outline I will try to cover today.

✓ Programming vs web development
✓ Class, Object, Method and Functions
✓Datatypes and Variables
°Primitive Datatypes
°Declarations
°Variable Names
°Numeric Literals
°Character Literals
°String
°Arrays
°Non-Primitive Datatypes

InShot_20220531_182138561.jpg

Source

What is Class, Object, Method and Functions

Class and Object: A Class can be easily define as blueprint or template for creating Object. Object on the other hand is easily mostly known as the instance of the class Class mostly seen or used in Object Oriented programming. For easy understanding just know that object oriented programming is easy in the sense that it works as any real life object. For example take a class as a boy, every class has an object and just as every boy has a his own unique characteristics. Another example, using a car as the class, a car has characteristics like seats, wheels, brakes, steering etc, with its behavior which is mobility is the method. This is the basic concept behind Class, object and method.

Method and Function: As explained before method are set of procedures in a class, that's is to say it's the step by step action or activities that goes on to produce an output. These method can't stand alone the are always found in a class. Function are also procedures, Some programmers would say the are same with different just little difference. Function can be easily said to be a set of reusable programming codes that can be called anything or anywhere they are needed, this saves the programer the time and stress taken to rewrite the code. I'm other words functions are reusable method.

Datatypes and Variables

Variables are known as storage medium that stores value (integers, Characters, and boolean type) depending on the Datatypes assigned by the programmer for example:
Age=60;
Age is the variables and 60 is the value, any where age is called or added 60 is automatically added.
Datatypes: As the names implies it's is usually Used to signify the type of data assigned to a variable. There are two types of datatypes in Java, we hare Primitive And Non-primitive.

Primitive datatype

Primitive datatype are fundamental data type that stores the data of only one specific data type

Types of primitive data type

DatatypeSizeRange of numbers been stored
byte1 byte-128 to 127
short2 byte-32,768 to 32,767
int4 bytes-2,147,483,648 to 2,147,483,647
long8 bytes-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
float4 bytesStores fractional numbers from 6 to 7 decimal place
double8 bytesStores fractional numbers up to 15 decimal place
boolean1 bittrue or false values
char2 bytessingle character and ASCII values

Note: Byte, short, long and int can only store whole numbers.
Float and double only stores fractional numbers
Char stores only characters like alphabet.
Boolean only Either True or False.

Non primitive

Non-primitive data types are data type which is a user-defined and can store the data of different types in a single entity.
Types of primitive
✓Array
✓String

Difference between primitive data type and non-primitive data types.

Primitive datatypeNon-primitive datatype
°Primitive types are predefined in Java°Non-primitive types are created by the programmer and is not defined by Java.
°Primitive is the fundamental data type° Non-primitive datatype is a derived datatype.
°Primitive types cannot be used to call method°Non-Primitive types can be used to call methods to perform certain operations .
°A primitive type must always has a value,°Non-primitive types can be null.
°A primitive type can starts with a lowercase Alphabet°Non-primitive datatype starts with an uppercase letter.
°The size of a primitive type depends on the data type°Non-primitive types have all the same size.

Arrays: Arrays are mostly used to store to store multiple values in a single variable
For example
✓int[] Boys = {Dan, Steve, John, Emma};

InShot_20220531_172201329.jpg

There are also used to create an a matrix

InShot_20220531_173116389.jpg

Arrays is a very large topic so I will stop here for now, so you don't get confused and continue tomorrow, believing you will settle down to accumulate all I have taught. Feel free to drop your questions below 👇.

Thanks for going through today's lecture hoping to see you guys tomorrow.
@steemcurator01
@preye2
@chiabertrand
@dayograpics

Sort:  

Wooow beautiful, original and high quality lessons on programming. I see you have put in a lot of time and efforts in this lessons

Thanks for sharing this valuable lessons with us

 2 years ago 

Thanks bro, I Am glad you find it educating and valuable.

Upvoted! Thank you for supporting witness @jswit.
Please check my new project, STEEM.NFT. Thank you!
default.jpg

 2 years ago 

Thank you very much dear witness

Your post has been successfully curated by our team via @nane15 at 50%. Thank you for your committed efforts, we invite you to do more and keep posting high quality posts for a chance to win valuable upvotes from our team of curators and probable selection for an additional upvote later this week in the Top Seven.

received_388032689541375-1.jpeg

Note: You must enter the tag #fintech among the first 4 tags for your post to be reviewed.

I must really commend your lecture on Java Programming, you have taught us really well and my knowledge on programming have increased. Thanks for your lecture sir.

Get programming assignment assistance from the experts at: https://studentlifesaviour.com

Australian Assignment Help is the best provider of assignments in all subjects including programming subject at: https://australianassignmenthelp.com

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63665.23
ETH 2621.19
USDT 1.00
SBD 2.77