Intro of Computer:
Computers are electronic devices designed to process data and perform tasks according to instructions.
Main components of a computer:
- CPU Brain of PC
- Memory RAM Storage of data
- Storage HDD/SSD
- Motherboards Main circuit board
- Power Supply Unit convert electricity from outlet
- Input Device Keyboards, mouse etc
- Output Device Monitors, Speakers ck
- Graphic Processing Unit Graphic design
- Cooling System Fans
Father of computer:
Charles Babbage Invented the concept of Analytical Engine in 1837
The Analytical engine contained an Arithmetic Logic Unit (ALU) basic flow control and integrated memory which led to the development of first general purpose Computer concept.
Reference link:(https://drive.google.com/file/d/18B_iG_TVKwD1WXtwtyXZXNe8KRbcKm3r/view
)
Trans
Human language <-----------------> Machine language
Interpreter/
Compiler
Machine language
Assembly language ----Formula trans------Fortran
High level language
Fortran programming language:
Fortran is a programming language used for scientific and numerical computing.
Fortran was developed by IBM in the 1950s and was the first computer language standard. The name is short for "Formula Translation".
COBOL programming language:
COBOL (Common Business-Oriented Language) is a high-level programming language used for business applications.
After that
Dennis Ritchie invented C
Guido invented python
Sun microsystems invented Java
Open source discovered by Richard Stallman
Source codes are open and free to see.
Linux:
Linux is an open-source operating system (OS) that is used in many different computing devices, including PCs, servers, and mobile devices. It's known for its reliability, security, and versatility, and is used in some of the world's most powerful supercomputers.
Linux is free to install and use on as many computers as you like.
Reference link:https://www.geeksforgeeks.org/introduction-to-linux-operating-system/
How to install Linux:
First download Linux mint Cinamon download link:https://linuxmint.com/edition.php?id=316
After that download Rufus 64-bit suitable version for your windows
Connect USB-pendrive run rufus then choose your USB and select the Linux mint disc image.
Partition scheme must be in GPT and click the start to convert into bootable.
After that it takes few minutes to complete when the status Ready then close the window.
Restart your pc and press boot menu (F9) or according to your pc.
Reference link:https://revathi22.wordpress.com/2024/07/27/dual-boot-windows-11-and-linux-mint-step-by-step-guide/
Java:
Java is a popular programming language.
Java is used to develop mobile apps, web apps, desktop apps, games and much more.
What is Java?
Java is a popular programming language, created in 1995.
It is owned by Oracle, and more than 3 billion devices run Java.
It is used for:
Mobile applications (specially Android apps)
Desktop applications
Web applications
Web servers and application servers
Games
Database connection
And much, much more!
Why Use Java?
Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
It is one of the most popular programming languages in the world
It has a large demand in the current job market
It is easy to learn and simple to use
It is open-source and free
It is secure, fast and powerful
It has huge community support (tens of millions of developers)
Java is an object oriented language which gives a clear structure to programs and allows code to be reused, lowering development costs
As Java is close to C++ and C#, it makes it easy for programmers to switch to Java.
Platform dependence:
Java is a class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is intended to let application developers write once and run anywhere.
Step By Step Code Execution in Java
The developer or programmer writes the code in a human-readable format. Java compiler compiles it into byte code.
Byte code is not the machine executable code and hence, requires an interpreter to interpret it. The interpreter is the Java Virtual Machine (JVM) that executes the Byte code.
Compilation and execution
Two step process that involves converting the source code into executable code.
The first step compile the source code into byte code using Java compiler (javac)
Execution step is to run the byte code using JVM.
To fix your Linux after installation
Step 1: Go to update manager
Step 2: Install updates Check its upto date
Step 3: Select view and click linux Kernels.
Step4: Warning pop up will appear click continue then check whether it is in latest version.
Step 5: Now your Linux Os is ready to use.
In linux open text editor
Select edit and click preferences
In Display check the display, line numbers.
Choose plugins and check the needed checkbox.
Now type the code in text editor:
public class First
{
public static void main(String[] args)
{
System.out.println("Welcome To Java");
}
}
*After typing the code press ctrl+s
*Pop up will appear click documents create a folder and name it after that keep a file name most important thing keep he class name as file name.
Open the terminal and type is to view the list of documents.
Now go to files and choose doc folder (B14) in that
right click and press open in terminal
The terminal will be opened type the command javac First.java
It will ask to install jdk in that choose the option yes.
After that list of jdk will appear in that select and copy sudo apt install default - jdk.
Please wait for few minutes until it gets completed then type the comand java filename.
Output will appear:
Welcome to java
Java first change the source code into byte code then convert into binary code.
Java ------> Byte code -------> Binary code
compiler
will check error
and trans into byte code
.java file -----> Checking error ------> .class file common for all
compiler platforms.
JDK
The Java Development Kit (JDK) is a cross-platformed software development environment that offers a collection of tools and libraries necessary for developing Java-based software applications and applets. It is a core package used in Java, along with the JVM (Java Virtual Machine) and the JRE (Java Runtime Environment).
JRE:
JRE should be installed to convert .class file into binary code
Java Runtime Environment (JRE) is an open-access software distribution that has a Java class library, specific tools, and a separate JVM. In Java, JRE is one of the interrelated components in the Java Development Kit (JDK). It is the most common environment available on devices for running Java programs. Java source code is compiled and converted to Java byte code. If you want to run this byte code on any platform,you need JRE.
JRE---->Jvm---->JIT compiler
Library:
Collection of java program it would be in .class file
JRE will collect .class file trans that file into binary code.
.java -------> .class ---------> Binary
jdk byte JIT compiler
code
Java is both compiled and interpreted language.
JIT compiler-Interpreter
Interprretation: Line by line translation.
OOPs (Object-Oriented Programming):
Object means a real-world entity such as a pen, chair, table, computer, watch, etc. Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. It simplifies software development and maintenance by providing some concepts:
Object
Class
Inheritance
Polymorphism
Abstraction
Encapsulation
Object
Java Object
Any entity that has state and behavior is known as an object. For example, a chair, pen, table, keyboard, bike, etc. It can be physical or logical.
An Object can be defined as an instance of a class. It contains an address and takes up some space in memory. Objects can communicate without knowing the details of each other's data or code.
Class
Collection of objects is called class. It is a logical entity.
A class can also be defined as a blueprint from which you can create an individual object. Class does not consume any space.
Top comments (0)