βHello , dear members of our channel how are doing? As many of you requested us ,we have finished the preparation to start lecture notes and lessons on java for beginners π±only.
What about seniors.? π·Idk
π€ The lessons will be given as easy to understand and help to get basic concepts of java therefore please help you loved one to join this channel and flourish programming basics.
π»The lessons are given by πCS students and if you have any points to include leave #on_the comment site.
The lessons will be started from the coming Monday.π
#let`s code together'π²
This link is very importantπππ
https://t.me/PROGRAMINGLANGUAGES1
What about seniors.? π·Idk
π€ The lessons will be given as easy to understand and help to get basic concepts of java therefore please help you loved one to join this channel and flourish programming basics.
π»The lessons are given by πCS students and if you have any points to include leave #on_the comment site.
The lessons will be started from the coming Monday.π
#let`s code together'π²
This link is very importantπππ
https://t.me/PROGRAMINGLANGUAGES1
Learn to code @java terminologies.pdf
431.8 KB
this pdf gives you short cut to cover necessary terminologies about java.
ππ»π»βοΈπ
size: 432kb;
prepared by: Ltc
why this: helps to be familiar with the terminologies of java
ππ»π»βοΈπ
size: 432kb;
prepared by: Ltc
why this: helps to be familiar with the terminologies of java
π»LESSON 1βοΈ
INTRODUCTION TO JAVA
Java is one of the most popular and widely used programming languages.
Java has been one of the most popular programming languages for many years.
Java is Object Oriented. However, it is not considered as pure object-oriented as it provides support for primitive data types (like int, char, etc)
The Java codes are first compiled into byte code (machine-independent code). Then the byte code runs on Java Virtual Machine (JVM) regardless of the underlying architecture.
Java syntax is similar to C/C++.ππΏ But Java does not provide low-level programming functionalities like pointers. Also, Java codes are always written in the form of classes and objects.
Java is used in all kinds of applications likeπ€³ Mobile Applications (Android is Java-based), desktop applications, web applications, client-server applications, enterprise applications, and many more.
π€When compared with C++, Java codes are generally more maintainable because Java does not allow many things which may lead to bad/inefficient programming if used incorrectly. πFor example, non-primitives are always references in Java. So we cannot pass large objects (like we can do in C++) to functions, we always pass references in Java. One more example, since there are no pointers, bad memory access is also not possible.
When compared with Python, Java kind of fits between C++ and Python. The programs are written in Java typically run faster than corresponding Python programs and slower than C++. Like C++, Java does static type checking, but Python does not.
#code1
//a java program to print "learn to code"
public class LTC {
public static void main(String args[])
{
System.out.println("Learn To Code");
}
}
https://t.me/PROGRAMINGLANGUAGES1
INTRODUCTION TO JAVA
Java is one of the most popular and widely used programming languages.
Java has been one of the most popular programming languages for many years.
Java is Object Oriented. However, it is not considered as pure object-oriented as it provides support for primitive data types (like int, char, etc)
The Java codes are first compiled into byte code (machine-independent code). Then the byte code runs on Java Virtual Machine (JVM) regardless of the underlying architecture.
Java syntax is similar to C/C++.ππΏ But Java does not provide low-level programming functionalities like pointers. Also, Java codes are always written in the form of classes and objects.
Java is used in all kinds of applications likeπ€³ Mobile Applications (Android is Java-based), desktop applications, web applications, client-server applications, enterprise applications, and many more.
π€When compared with C++, Java codes are generally more maintainable because Java does not allow many things which may lead to bad/inefficient programming if used incorrectly. πFor example, non-primitives are always references in Java. So we cannot pass large objects (like we can do in C++) to functions, we always pass references in Java. One more example, since there are no pointers, bad memory access is also not possible.
When compared with Python, Java kind of fits between C++ and Python. The programs are written in Java typically run faster than corresponding Python programs and slower than C++. Like C++, Java does static type checking, but Python does not.
#code1
//a java program to print "learn to code"
public class LTC {
public static void main(String args[])
{
System.out.println("Learn To Code");
}
}
https://t.me/PROGRAMINGLANGUAGES1
π1π₯1
π»LESSON2πβοΈ
#Compiling a Program
Compiling converts the source files that you write into bytecode that can be executed by a
Java Virtual Machine. The source file has a #.java extension. It also defines a public class of the same name. For example, the class, 'SayHello', must be saved in a file called SayHello.java.
To compile the SayHello source code, perform the following steps:
ππΏ1. Go to the directory where the source code files are stored.
π2. Enter the following command for each .java file that you want to compile (Note that the
.java extension is required.):
Example: javac SayHello.java
After the compilation has finished, and assuming no compilation errors have occurred, you
should have a new file called <classname>.class in your directory for each source code
file that you compiled.
Example: SayHello.class
REMARK:π§ π
A Java program can output data in many ways. Here are some
examples:
β’ To a file or database
β’ To the console
β’ To a webpage or other user interface
[we'll see how? ...]
....CONTINUES..
https://t.me/PROGRAMINGLANGUAGES1
#Compiling a Program
Compiling converts the source files that you write into bytecode that can be executed by a
Java Virtual Machine. The source file has a #.java extension. It also defines a public class of the same name. For example, the class, 'SayHello', must be saved in a file called SayHello.java.
To compile the SayHello source code, perform the following steps:
ππΏ1. Go to the directory where the source code files are stored.
π2. Enter the following command for each .java file that you want to compile (Note that the
.java extension is required.):
Example: javac SayHello.java
After the compilation has finished, and assuming no compilation errors have occurred, you
should have a new file called <classname>.class in your directory for each source code
file that you compiled.
Example: SayHello.class
REMARK:π§ π
A Java program can output data in many ways. Here are some
examples:
β’ To a file or database
β’ To the console
β’ To a webpage or other user interface
[we'll see how? ...]
....CONTINUES..
https://t.me/PROGRAMINGLANGUAGES1
π1
QUIZE.2: which feature sets java apart from the most other programming languages?except
Anonymous Quiz
30%
a. platform-independent
20%
b.Object-oriented
18%
c.compiled faster than any other language
20%
d.uses javac to compile java source code
12%
e. none
data base fundamentals.pdf
214.4 KB
to get materials for coding βοΈ press open in telegram now!
1. c++ books for beginners
1.1 recommended book for c++
2. python book for beginner
3. java for beginner
*ltc-βπΏ
1.1 recommended book for c++
2. python book for beginner
3. java for beginner
*ltc-βπΏ
π€1
ππΏπ» Secured
Java is best known for its security. With Java, we can develop virus-free systems. Java is secured because:
β No explicit pointer
β Java Programs run inside a virtual machine sandbox
β Classloader: Classloader in Java is a part of the Java Runtime Environment(JRE) which is used to load Java classes into the Java Virtual Machine dynamically. It adds security by separating the package for the classes of the local file system from those that are imported from network sources.
β Bytecode Verifier: It checks the code fragments for illegal code that can violate access right to objects.
β Security Manager: It determines what resources a class can access such as reading and writing to the local disk.
Java language provides these securities by default. Some security can also be provided by an application developer explicitly through SSL, JAAS, Cryptography, etc.
Java is best known for its security. With Java, we can develop virus-free systems. Java is secured because:
β No explicit pointer
β Java Programs run inside a virtual machine sandbox
β Classloader: Classloader in Java is a part of the Java Runtime Environment(JRE) which is used to load Java classes into the Java Virtual Machine dynamically. It adds security by separating the package for the classes of the local file system from those that are imported from network sources.
β Bytecode Verifier: It checks the code fragments for illegal code that can violate access right to objects.
β Security Manager: It determines what resources a class can access such as reading and writing to the local disk.
Java language provides these securities by default. Some security can also be provided by an application developer explicitly through SSL, JAAS, Cryptography, etc.
1.// Java program to demonstrate
boolean data type
class LearnToCode {
public static void main(String args[])
{
boolean b = true;
if (b == true)
System.out.println("Hi world!");
}
}
telegram || facebook group
boolean data type
class LearnToCode {
public static void main(String args[])
{
boolean b = true;
if (b == true)
System.out.println("Hi world!");
}
}
telegram || facebook group
Types of Variables in Java
Now let us discuss different types of variables which are listed as follows:
1.Local Variables
-A variable defined within a block or method or constructor is called a local variable.
2.Instance Variables
-Instance variables are non-static variables and are declared in a class outside any method, constructor, or block.
3.Static Variables
-Static variables are also known as Class variables.
* These variables are declared similarly as instance variables. The difference is that static variables are declared using the static keyword within a class outside any method constructor or block.
telegram || facebook group
Now let us discuss different types of variables which are listed as follows:
1.Local Variables
-A variable defined within a block or method or constructor is called a local variable.
2.Instance Variables
-Instance variables are non-static variables and are declared in a class outside any method, constructor, or block.
3.Static Variables
-Static variables are also known as Class variables.
* These variables are declared similarly as instance variables. The difference is that static variables are declared using the static keyword within a class outside any method constructor or block.
telegram || facebook group
π1
Forwarded from ALX Ethiopia
ALX's Software Engineering Programme prepares you with the right skills for a global career as a Full-Stack Developer. Apply soon. Tell your friends about it. https://bit.ly/3JI3IJ3