0% found this document useful (0 votes)
18 views

Java - Unit2 2023-24 (CS Major)

Uploaded by

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

Java - Unit2 2023-24 (CS Major)

Uploaded by

web
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

UNIT-2

Arrays
What is an array and Explain types of arrays with examples?
Normally, array is a collection of similar type of elements that have contiguous memory location.
Java array is an object the contains elements of similar data type. It is a data structure where we store
similar elements. We can store only fixed set of elements in a java array.
Array in java is index based, first element of the array is stored at 0 index.

Advantage of Java Array


 Code Optimization: It makes the code optimized, we can retrieve or sort the data easily.
 Random access: We can get any data located at any index position.
Disadvantage of Java Array
 Size Limit: We can store only fixed size of elements in the array. It doesn't grow its size at runtime.
To solve this problem, collection framework is used in java.
Types of Array in java
There are two types of array.
1. Single Dimensional Array
2. Multidimensional Array
Single Dimensional Array in java
An array stores similar type of elements in only one dimension at contiguous memory locations is
called single dimensional array.
Syntax to Declare an Array in java
1. dataType[] arr; (or)
2. dataType []arr; (or)
3. dataType arr[];
Instantiation of an Array in java
1.arrayRefVar=new datatype[size]; (or)
2.int a[]={33,3,4,5};//declaration, instantiation and initialization
Example of single dimensional java array
We can declare, instantiate and initialize the java array together by:
Let's see the simple example to print this array.
1. class Testarray1{
2. public static void main(String args[]){
3. int a[]={33,3,4,5};//declaration, instantiation and initialization
4. //printing array
5. for(int i=0;i<a.length;i++)//length is the property of array
6. System.out.println(a[i]);
7. }} Test it Now
Output: 33 3 4 5
UNIT-2

Multidimensional array in java


An array which stores data in row and column based index (also known as matrix form) is called
multidimensional array.
Example :

Syntax to Declare Multidimensional Array in java


1. dataType[][] arrayRefVar; (or)
2. dataType [][]arrayRefVar; (or)
3. dataType arrayRefVar[][]; (or)
4. dataType []arrayRefVar[];
Example to instantiate Multidimensional Array in java
int[][] arr=new int[3][3];//3 row and 3 column
Example of Multidimensional java array
Let's see the simple example to declare, instantiate, initialize and print the 2Dimensional array.
1. class Testarray3{
2. public static void main(String args[]){
3. //declaring and initializing 2D array
4. int arr[][]={{1,2,3},{2,4,5},{4,4,5}};
5. //printing 2D array
6. for(int i=0;i<3;i++){
7. for(int j=0;j<3;j++){
8. System.out.print(arr[i][j]+" ");
9. }
10. System.out.println();
11. }
12. }}
Test it Now
Output: 1 2 3
245
445
Command line argument in Java
The command line argument is the argument passed to a program at the time when
you run it. To access the command-line argument inside a java program is quite easy, they are
stored as string in String array passed to the args parameter of main() method.
Example
class cmd
{
UNIT-2

public static void main(String[] args)


{
for(int i=0;i< args.length;i++)
{
System.out.println(args[i]);
}
}
}
Execute this program as java cmd 10 20 30

Strings-String Class Methods


Strings in Java are a fundamental data type used to represent sequences of characters. They are objects of
the String class, which is part of the Java standard library. Here’s an overview of how strings work in Java:
1. Creating Strings
You can create strings in several ways:
 String Literal: Using double quotes.

String str1 = "Hello, World!";


 Using the new Keyword:

String str2 = new String("Hello, Java!");


2. String Immutability
Strings in Java are immutable, meaning once a String object is created, it cannot be changed. Any
modification to a string results in the creation of a new string.
3. Common String Methods
Java's String class provides various methods to manipulate and interact with strings:
 Length: Get the length of a string.
int length = str1.length(); // 13
 Substring: Extract a portion of the string.
String sub = str1.substring(0, 5); // "Hello"
UNIT-2

 Concatenation: Combine strings.


String str3 = str1 + " " + str2; // "Hello, World! Hello, Java!"
 Trim: Remove whitespace from the beginning and end.
String trimmed = " Hello ".trim(); // "Hello"
 Uppercase and Lowercase:
String upper = str1.toUpperCase(); // "HELLO, WORLD!"
String lower = str1.toLowerCase(); // "hello, world!"
 Replace: Replace characters or substrings.
String replaced = str1.replace("World", "Java"); // "Hello, Java!"
 Character Access: Access characters at a specific index.
char ch = str1.charAt(1); // 'e'
 equals(): Checks for content equality.
boolean isEqual = str1.equals(str2);
 compareTo(): Compares two strings lexicographically.
int comparison = str1.compareTo(str2);
Example java program for String functions:

//Example java program for String functions


public class StringExample {
public static void main(String[] args) {
// Creating strings
String str1 = "Hello, World!";
String str2 = new String("Hello, Java!");

// Displaying original strings


System.out.println("String 1: " + str1);
System.out.println("String 2: " + str2);

// Length of strings
System.out.println("Length of String 1: " + str1.length());
System.out.println("Length of String 2: " + str2.length());

// Substring
String subStr = str1.substring(0, 5);
System.out.println("Substring of String 1 (0-5): " + subStr);

// Concatenation
String concatenated = str1 + " " + str2;
System.out.println("Concatenated String: " + concatenated);

// Trimming
String trimmed = " Hello ".trim();
System.out.println("Trimmed String: '" + trimmed + "'");

// Uppercase and Lowercase


System.out.println("Uppercase String 1: " + str1.toUpperCase());
System.out.println("Lowercase String 2: " + str2.toLowerCase());

// Replacing characters
String replaced = str1.replace("World", "Java");
UNIT-2

System.out.println("Replaced String 1: " + replaced);

// Character access
char ch = str1.charAt(1);
System.out.println("Character at index 1 of String 1: " + ch);

// Comparing strings
boolean isEqual = str1.equals(str2);
System.out.println("Are String 1 and String 2 equal? " + isEqual);

// String formatting
String formatted = String.format("Formatted Output: Name: %s, Age: %d", "Alice", 30);
System.out.println(formatted);
}
}

Classes & Objects: Creating Classes, declaring objects, Methods


Concept of Classes
A class is defined as an encapsulation of data and methods that operate on the data.
When we are creating a class we are actually creating a new data type. This new data type is
also called ADT.

When we define a class we can easily create a number of instances of that class
Creating class in java:
In java, a class can be defined through the use of class keyword. The general definition of a
class is given below:
class classname
{
type instance_variable1;
type instance_variable1;
………
returntype methodname(parameter list)
{
// body of method
}
……………………..
}
Here,
● class is a keyword used to define class
UNIT-2

● class name is the identifier that specifies the name of the class
● type specifies the datatype of the variable
● instance_variable1, . . . are the variable defined in the class
● method name is the method defined in the class that can operate on the variables in
the class
Example:
class Sample
{ int x, y;
setXY()
{
x=10; y=20;
}
}
The variables defined in the class are called member variables/data members
The functions defined in the class are called member functions/member methods.
Both data members and member methods together called members of class.
Concept of Objects
Objects are instances of a class. Objects are created and this process is called
“Instantiation”. In java objects are created through the use of new operator. The new operator
creates an object and allocates memory to that object. Since objects are created at runtime,
they are called runtime entities.
In java object creation is a two step process.
Step1: create a reference variable of the class. When this declaration is made a
reference variable is created in memory and initialized with null.
Example: Sample s;
Step2: create the object using the new operator and assign the address of the
object to the reference variable created in step1.
Example: Sample s=new Sample();
The step2 creates the object physically and stores the address of the object in the
reference variable.
Accessing members of an object:
Once an object of a class is created we can access the members of the class through the use of
object name and „.„ (dot) operator.
Syntax: objectname. member;
Example:
class sample
{ int x, y;
setXY()
{
x=10; y=20;
}
UNIT-2

printXY()
{ System.out.print(“=”+x);
System.out.print(“=”+y);
}
}
class Demo
{ public static void main(String ar[])
{ sample s;
s=new sample();
s.setXY();
s.printXY();
}
}
Constructors
A constructor is a special kind of method that has the same name as that of class in
which it is defined. It is used to automatically initialize an object when the object is created.
Constructor gets executed automatically at the time of creating the object. A constructor
doesn‟t have any return type.
Example: // program to demonstrate constructor
class Student
{
int number;
String name;
Student() // default constructor
{
number=569;
name=”satyam”;
}
Student(int no, String s) // parameterized constructor
{
number=no;
name=s;
}
void showStudent()
{
System.out.println(“number =”+number);
System.out.println(“name =”+name);
}
}
class Demo
{
public static void main(String ar[])
{
Student s1=new Student();
UNIT-2

Student s2=new Student(72,”raju”);


s1.showStudent();
s2.showStudent();
}
}

Output: number= 569


name= satyam
number= 72
name= raju

„this‟ keyword
„this‟ keyword : „this‟ keyword refers to the current object. Sometimes a member method
of a class needs to refer to the object in which it was invoked. In order to serve this purpose
java introduces “this keyword”. By using „this‟ keyword we can remove name space conflict.
Name Space Conflict: When the parameters of a member method have the same name as
that of instance variables of the class, local variables take the priority over the instance
variable. This leads to conflict called „name space conflict‟. It can be resolved with “this” .
Example:
class Student
{
int number;
String name;
void setStudent(int number, String name)
{
this.number=number;
this.name=name;
}
void showStudent()
{ System.out.println(“number=”+number);
System.out.println(“name=”+name);
}
}
class Display
{
public static void main(String ar[])
{
Student s=new Student(); // object creation for class Student
s.setStudent(1,”Rama”);
s.showStudent();
}
}
UNIT-2

Overloading Constructors
Just like member methods constructors can also be overloaded. The following example
emonstrates this,
class Student
{ int no;
String name;
Student()
{ no=70;
name=”ram”;
}
Student(int n, String s)
{ no=n; name=s;
}
void show()
{ System.out.println(“Number=”+no);
System.out.println(“Name=”+name);
}
}
class Display
{ public static void main(String ar[])
{
Student s1= new Student();
Student s2= new Student(69,”satya”);
s1.show();
s2.show();
}
}
Output: number=70
name=ram
number=69
name=satya

Understanding Static keyword:


In java, static keyword can be used for the following purposes.
● To create static data members
● To define static methods
● To define static blocks
Static variables:
When a data member of a class, is declared static only one copy of it is created in
memory and is used by all the objects of the class. Hence static variables are essentially global
variables.
UNIT-2

When a modification is performed on a static variable the change will be reflected in all
objects of the class for which the static variable is a member.
Static Methods:
● A static method can call other static methods only
● A static method can access static variables only
● Static methods can‟t have access to this/ super keyword.
Static Blocks:
Just like static variables and static methods we can also create a static block . this static block
is used to initialize the static variables.
Example program:
class UseStatic
{ static int a=3;
static int b;
static void meth(int x)
{
System.out.println(“x=” + x);
System.out.println(“a=” + a);
System.out.println(“b=” + b);
}
static
{
System.out.println(“static block initialized”);
}
public static void main(String args[])
{
meth(69);
}
}

Output: static block initialized


x = 69
a=3
b = 12

INHERITANCE
What is inheritance?
Inheritance in Java is a mechanism in which one object acquires(inherits/derives) all the properties
and behaviors of a parent object. It is an important part of OOPs (Object Oriented programming system).
The idea behind inheritance in Java is that you can create new classes that are built upon existing
classes. When you inherit from an existing class, you can reuse methods and variables of the parent class.
Moreover, you can add new methods and variables in your current class also.
Inheritance represents the IS-A relationship which is also known as a parent-child relationship.
UNIT-2

Uses of inheritance in java


1. For Method Overriding (so runtime polymorphism can be achieved).
2. For Code Reusability.
Terms used in Inheritance
Class: A class is a group of objects which have common properties. It is a template or blueprint from
which objects are created.
Sub Class/Child Class: Subclass is a class which inherits the other class. It is also called a derived
class, extended class, or child class.
Super Class/Parent Class: Super class is the class from where a subclass inherits the features. It is
also called a base class or a parent class.
Reusability: As the name specifies, reusability is a mechanism which facilitates you to reuse the
fields and methods of the existing class when you create a new class. You can use the same fields and
methods already defined in the previous class.
Syntax of Java Inheritance
1. class Subclass-name extends Superclass-name
2. {
3. //methods and fields
4. }
The extends keyword indicates that you are making a new class that derives from an existing class. The
meaning of "extends" is to increase the functionality. In Java, a class which is inherited is called a parent or
superclass, and the new class is called child or subclass.
Java Inheritance Example
As displayed in the below figure, Programmer is the subclass and Employee is the superclass. The
relationship between the two classes is Programmer IS-A Employee. It means that Programmer is a type of
Employee.
1. /* Example Program on java inheritance */
2. class Employee{
3. float salary=40000;
4. }
5. class Programmer extends Employee{
6. int bonus=10000;
7. public static void main(String args[]){
8. Programmer p=new Programmer();
9. System.out.println("Programmer salary is:"+p.salary);
10. System.out.println("Bonus of Programmer is:"+p.bonus);
11. }
12. }
Output :
Programmer salary is:40000.0
Bonus of programmer is:10000
In the above example, Programmer object can access the field of own class as well as of Employee class i.e.
code reusability.
UNIT-2

Types of inheritance in java


In java, Inheritance is classified into five types. Those are listed below.
1. Single Inheritance
2. Multiple Inheritance (Through Interface)
3. Multilevel Inheritance
4. Hierarchical Inheritance
5. Hybrid Inheritance (Through Interface)
Single Inheritance in Java
Single Inheritance is the simple inheritance of all, When a class extends another class(Only one
class) then we call it as Single inheritance. The below diagram represents the single inheritance in java
where Class B extends only one class Class A. Here Class B will be
the Subclass and Class A will be one and only Super class.

Single Inheritance Example


public class ClassA
{
public void dispA()
{
System.out.println("disp() method of ClassA");
}
}
public class ClassB extends ClassA
{
public void dispB()
{
System.out.println("disp() method of ClassB");
}
public static void main(String args[])
{
//Assigning ClassB object to ClassB reference
ClassB b = new ClassB();
//call dispA() method of ClassA
b.dispA();
//call dispB() method of ClassB
b.dispB();
}
}
Output:
disp() method of ClassA
disp() method of ClassB
UNIT-2

Multiple Inheritance in Java


Multiple Inheritance is nothing but one class extending more than one class. Multiple Inheritance
is basically not supported by many Object Oriented Programming languages such as Java, Small Talk,
C# etc.. (C++ Supports Multiple Inheritance). As the Child class has to manage the dependency of more
than one Parent class. But you can achieve multiple inheritances in Java using Interfaces.

Multilevel Inheritance in Java


In Multilevel Inheritance a derived class will be inheriting a parent class and as well as the
derived class act as the parent class to other class. As seen in the below diagram. ClassB inherits the
property of ClassA and again ClassB act as a parent for ClassC. In Short ClassA parent
for ClassB and ClassB parent for ClassC.

MultiLevel Inheritance Example


public class ClassA
{
public void dispA()
{
System.out.println("disp() method of ClassA");
}
}
public class ClassB extends ClassA
{
public void dispB()
{
System.out.println("disp() method of ClassB");
}
}
public class ClassC extends ClassB
{
public void dispC()
{
System.out.println("disp() method of ClassC");
}
public static void main(String args[])
{
UNIT-2

//Assigning ClassC object to ClassC reference


ClassC c = new ClassC();
//call dispA() method of ClassA
c.dispA();
//call dispB() method of ClassB
c.dispB();
//call dispC() method of ClassC
c.dispC();
}
}
Output: disp() method of ClassA
disp() method of ClassB
disp() method of ClassC
Hierarchical Inheritance in Java
In Hierarchical inheritance one parent class will be inherited by many sub classes. As per the
below example ClassA will be inherited by ClassB, ClassC and ClassD. ClassA will be acting as a parent
class for ClassB, ClassC and ClassD.

Hierarchical Inheritance Example


public class ClassA
{
public void dispA()
{
System.out.println("disp() method of ClassA");
}
}
public class ClassB extends ClassA
{
public void dispB()
{
System.out.println("disp() method of ClassB");
}
}
public class ClassC extends ClassA
{
public void dispC()
{
System.out.println("disp() method of ClassC");
}
UNIT-2

}
public class ClassD extends ClassA
{
public void dispD()
{
System.out.println("disp() method of ClassD");
}
}
public class HierarchicalInheritanceTest
{
public static void main(String args[])
{
//Assigning ClassB object to ClassB reference
ClassB b = new ClassB();
//call dispB() method of ClassB
b.dispB();
//call dispA() method of ClassA
b.dispA();

//Assigning ClassC object to ClassC reference


ClassC c = new ClassC();
//call dispC() method of ClassC
c.dispC();
//call dispA() method of ClassA
c.dispA();

//Assigning ClassD object to ClassD reference


ClassD d = new ClassD();
//call dispD() method of ClassD
d.dispD();
//call dispA() method of ClassA
d.dispA();
}
}

Output :
disp() method of ClassB
disp() method of ClassA
disp() method of ClassC
disp() method of ClassA
disp() method of ClassD
disp() method of ClassA
UNIT-2

Hybrid Inheritance in Java


Hybrid Inheritance is the combination of both Single and Multiple Inheritance. Again Hybrid
inheritance is also not directly supported in Java only through interface we can achieve this. Flow diagram of
the Hybrid inheritance will look like below. As you can ClassA will be acting as the Parent class
for ClassB & ClassC and ClassB & ClassC will be acting as Parent for ClassD.

Why multiple inheritance is not supported in java?


To reduce the complexity and simplify the language, multiple inheritance is not supported in java.
Consider a scenario where A, B, and C are three classes. The C class inherits A and B classes. If A
and B classes have the same method and you call it from child class object, there will be ambiguity to call
the method of A or B class.
Since compile-time errors are better than runtime errors, Java renders compile-time error if you
inherit 2 classes. So whether you have same method or different, there will be compile time error.
class A
{
void msg(){System.out.println("Hello");}
}
class B
{
void msg(){System.out.println("Welcome");}
}
class C extends A,B
{ //suppose if it were
Public Static void main(String args[]){
C obj=new C();
obj.msg(); //Now which msg() method would be invoked?
}
}
Output: Compile time error.

Method Overriding
If subclass (child class) has the same method as declared in the parent class, it is known as method
overriding in java.
In other words, If subclass provides the specific implementation of the method that has been provided by one
of its parent class, it is known as method overriding.
UNIT-2

Usage of Java Method Overriding


 Method overriding is used to provide specific implementation of a method that is already provided by
its super class.
 Method overriding is used for runtime polymorphism
Rules for Java Method Overriding
1. Method must have same name as in the parent class
2. Method must have same parameter as in the parent class.
3. Must be IS-A relationship (inheritance).
Example of method overriding
In this example, we have defined the run method in the subclass as defined in the parent class but it
has some specific implementation. The name and parameter of the method is same and there is IS-A
relationship between the classes, so there is method overriding.
class Vehicle
{
void run()
{
System.out.println("Vehicle is running");
}
}
class Bike2 extends Vehicle
{
void run()
{
System.out.println("Bike is running safely");
}
public static void main(String args[]){
Bike2 obj = new Bike2();
obj.run();
}
Output: Bike is running safely
Overloading Methods
In java, it is possible for a class, to contain two or more methods with the same name as
long as the method signatures are different. That is the method should have different number
of parameters or different type of parameters when this is the case the methods are said to be
overloaded and the mechanism is called method overloading.
Example:
class Student
{ int no ,marks;
String name;
void setStudent()
{
no=1; marks=89; name=”rama”;
}
UNIT-2

void setStudent(int no, int marks, String name)


{
this.no=no; this.marks=marks; this.name=name;
}
void showStudent()
{
System.out.println(“number=”+no);
System.out.println(“marks=”+marks);
System.out.println(“name”+name);
}
}
class MethodOverload
{
public static void main(String ar[])
{
Student s=new Student();
s.setStudent();
s.showStudent();

s.setStudent(69,81,”ramu”);
s.showStudent();
}
}
Output: number=1
marks=89
name=rama
number=69
marks=81
name=ramu

Final Keyword In Java


Explain final variable, final method, and final class in java?
The final keyword in java is used to restrict the user. The java final keyword can be used in many
contexts. Final can be:
1. Variable
2. Method
3. Class
The final keyword can be applied with the variables, a final variable that have no value it is called blank
final variable or uninitialized final variable. It can be initialized in the constructor only. The blank final
variable can be static also which will be initialized in the static block only. We will have detailed learning of
these. Let's first learn the basics of final keyword.
UNIT-2

Java final variable


If you make any variable as final, you cannot change the value of final variable (It will be constant).
Example of final variable
There is a final variable speedlimit, we are going to change the value of this variable, but It can't be changed
because final variable once assigned a value can never be changed.
1. class Bike{
2. final int speedlimit=90;//final variable
3. void run(){
4. speedlimit=400;
5. }
6. public static void main(String args[]){
7. Bike obj=new Bike();
8. obj.run();
9. }
10. }//end of class
Output : Compile Time Error

Java final method


If you make any method as final, you cannot override it.
Example of final method
1. class Bike{
2. final void run(){System.out.println("running");}
3. }
4. class Honda extends Bike{
5. void run(){System.out.println("running safely with 100kmph");}
6. public static void main(String args[]){
7. Honda honda= new Honda();
8. honda.run();
9. }
10. }
Output : Compile Time Error
Java final class
If you make any class as final, you cannot extend it.
Example of final class
1. final class Bike{}
2. class Honda1 extends Bike{
3. void run(){System.out.println("running safely with 100kmph");}
4. public static void main(String args[]){
5. Honda1 honda= new Honda1();
6. honda.run();
7. }
8. }
Output : Compile Time Error
UNIT-2

Super Keyword
In Java, the super keyword is used to refer to the superclass (the parent class) of the current object. It is often
used in the context of inheritance and can serve several purposes:
1. Accessing Superclass Methods
You can use super to call a method defined in the superclass that has been overridden in the subclass.
class Parent {
void display() {
System.out.println("Display from Parent");
}
}
class Child extends Parent {
void display() {
System.out.println("Display from Child");
}

void show() {
super.display(); // Calls the Parent's display method
}
}
public class SuperExample {
public static void main(String[] args) {
Child child = new Child();
child.show(); // Output: Display from Parent
}
}

2. Accessing Superclass Constructor


You can use super() to call a constructor of the superclass. This is typically done in the constructor of the
subclass.
class Parent {
Parent() {
System.out.println("Parent Constructor");
}
}
class Child extends Parent {
Child() {
super(); // Calls the Parent constructor
System.out.println("Child Constructor");
}
}
public class SuperExample {
public static void main(String[] args) {
Child child = new Child();
UNIT-2

// Output:
// Parent Constructor
// Child Constructor
}
}

3. Accessing Superclass Fields


You can use super to access fields defined in the superclass when they are shadowed by fields in the
subclass.
class Parent {
String name = "Parent";
}
class Child extends Parent {
String name = "Child";

void displayNames() {
System.out.println("Child name: " + name); // Child's name
System.out.println("Parent name: " + super.name); // Parent's name
}
}
public class SuperExample {
public static void main(String[] args) {
Child child = new Child();
child.displayNames();
// Output:
// Child name: Child
// Parent name: Parent
}
}

Abstract class & Method in Java


1. Abstract class in Java
A class which is declared with the abstract keyword is known as an abstract class in Java. It can have
abstract and non-abstract methods (method with the body).
Abstract class in Java
A class which is declared as abstract is known as an abstract class. It can have abstract and non-
abstract methods. It needs to be extended and its method implemented. It cannot be instantiated.
Important Points
 An abstract class must be declared with an abstract keyword.
 It can have abstract and non-abstract methods.
 It cannot be instantiated.
 It can have constructors and static methods also.
 It can have final methods which will force the subclass not to change the body of the method.
UNIT-2

Example of abstract class


abstract class A
{
//abstract methods and normal methods
}
2. Abstract Method in Java
A method which is declared as abstract and does not have implementation is known as an abstract
method.
Example of abstract method
abstract void printStatus(); //no method body and abstract
Example of Abstract class that has an abstract method
In this example, Bike is an abstract class that contains only one abstract method run. Its implementation is
provided by the Honda class.
1. abstract class Bike{
2. abstract void run();
3. }
4. class Honda4 extends Bike{
5. void run(){System.out.println("running safely");}
6. public static void main(String args[]){
7. Bike obj = new Honda4();
8. obj.run();
9. }
10. }
Test it Now

Output: running safely

You might also like