ππΏπ» 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
πlet's invite you amazing bot to get videos of programming tutors
just follows the instructions given!
click ππΏ this to get the bot
stay with us
join international facebook group
just follows the instructions given!
click ππΏ this to get the bot
stay with us
join international facebook group
β€1
cotrol structures in java.ltc.pdf
2 MB
1β>if(...conditions..) {
//statements...
}
2βfor( ; ; )
{
//statements..
}
3. while(..condition...)
{
//statements...
}
the above structures are discussed in the pdf . "it's basic"!!
telegram || international facebook group
//statements...
}
2βfor( ; ; )
{
//statements..
}
3. while(..condition...)
{
//statements...
}
the above structures are discussed in the pdf . "it's basic"!!
telegram || international facebook group
π2
functions in c++.pdf
688.9 KB
#FOR C++,
THIS pdf covers
- function prototype
- function declaration
- function calling and others....
|| facebook programmers group
||
THIS pdf covers
- function prototype
- function declaration
- function calling and others....
|| facebook programmers group
||
Recursion- C++.pdf
1.1 MB
#BEST NOTE, AND EXAMPLES ON RECURSION.
_ is iterative or recursive algorithm more efficient?
share and join our channel
https://t.me/PROGRAMINGLANGUAGES1
_ is iterative or recursive algorithm more efficient?
share and join our channel
https://t.me/PROGRAMINGLANGUAGES1
#include <iostream>
int print(int p);
int main() { int p; std::cout<<print(5); return 1; } int print(int x) { int p; if(x==0) return 1 ; p=2*print(x-1); return p; } => use print(5)
int print(int p);
int main() { int p; std::cout<<print(5); return 1; } int print(int x) { int p; if(x==0) return 1 ; p=2*print(x-1); return p; } => use print(5)
Final Results
42%
32
25%
63
0%
1
17%
6
17%
check on compiler
π3
#FOR PYTHON PRACTICES LOOK THIS INFORMATIONS:-
(may be for other languages too)
π Learn Python Here :
1. W3schools.com
2. Freecodecamp.org
3. geeksforgeeks.org
4. udacity.com
5. udemy.com
6. codeacademy.com
7. coursera.org
8. edx.org
9. youtube.com
π Practice Python Here :
1. codewars.com
2. hackerrank.com
3. topcoder.com
4. coderbyte.com
5. hackerearth.com
6. leetcode.com
7. codechef.com
8. edabit.com
9. codeforces.com
ββ Ask Python Questions here :
1. stackoverflow.com
2. quora.com
3. github.com
4. reddit.com
β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬
if u already know these, then share for your friendπ€·πΌββοΈπ€·π»ββοΈ =Β» shareIt
πΊChannel :- telegram
πfacebook :- facebook coders group
(may be for other languages too)
π Learn Python Here :
1. W3schools.com
2. Freecodecamp.org
3. geeksforgeeks.org
4. udacity.com
5. udemy.com
6. codeacademy.com
7. coursera.org
8. edx.org
9. youtube.com
π Practice Python Here :
1. codewars.com
2. hackerrank.com
3. topcoder.com
4. coderbyte.com
5. hackerearth.com
6. leetcode.com
7. codechef.com
8. edabit.com
9. codeforces.com
ββ Ask Python Questions here :
1. stackoverflow.com
2. quora.com
3. github.com
4. reddit.com
β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬
if u already know these, then share for your friendπ€·πΌββοΈπ€·π»ββοΈ =Β» shareIt
πΊChannel :- telegram
πfacebook :- facebook coders group
π5π1
INLINE FUNCTION [ C++]
//Inline Function example
#include<iostream.h>
#include<conio.h>
class line
{
public:
inline float mul(float x,float y)
{
return(x*y);
}
inline float cube(float x)
{
return(x*x*x);
}
};
void main()
{
line obj;
float val1,val2;
clrscr();
cout<<"Enter two values:";
cin>>val1>>val2;
cout<<"\nMultiplication value is:"<<obj.mul(val1,val2);
cout<<"\n\nCube value is :"<<obj.cube(val1)<<"\t"<<obj.cube(val2);
getch();
}
Output:
Enter two values:10 20
Multiplication value is:200
Cube value is :1000 8000
//Inline Function example
#include<iostream.h>
#include<conio.h>
class line
{
public:
inline float mul(float x,float y)
{
return(x*y);
}
inline float cube(float x)
{
return(x*x*x);
}
};
void main()
{
line obj;
float val1,val2;
clrscr();
cout<<"Enter two values:";
cin>>val1>>val2;
cout<<"\nMultiplication value is:"<<obj.mul(val1,val2);
cout<<"\n\nCube value is :"<<obj.cube(val1)<<"\t"<<obj.cube(val2);
getch();
}
Output:
Enter two values:10 20
Multiplication value is:200
Cube value is :1000 8000
π1
PALINDROME NUMBER [ JAVA]
import java.util.*;
class Palindrome
{
public static void main(String args[])
{
String original, reverse="";
Scanner in = new Scanner(System.in);
System.out.println("Enter a string to check if it is a palindrome");
original = in.nextLine();
int length = original.length();
for ( int i = length - 1 ; i >= 0 ; i-- )
reverse = reverse + original.charAt(i);
if (original.equals(reverse))
System.out.println("Entered string is a palindrome.");
else
System.out.println("Entered string is not a palindrome.");
}
}
Output:
Enter a string to check if it is a palindrome
45654
Entered string is a palindrome.
import java.util.*;
class Palindrome
{
public static void main(String args[])
{
String original, reverse="";
Scanner in = new Scanner(System.in);
System.out.println("Enter a string to check if it is a palindrome");
original = in.nextLine();
int length = original.length();
for ( int i = length - 1 ; i >= 0 ; i-- )
reverse = reverse + original.charAt(i);
if (original.equals(reverse))
System.out.println("Entered string is a palindrome.");
else
System.out.println("Entered string is not a palindrome.");
}
}
Output:
Enter a string to check if it is a palindrome
45654
Entered string is a palindrome.
π1