A ready-made template for creating objects of the same type with common characteristics


Download 9.53 Kb.
Sana03.11.2023
Hajmi9.53 Kb.
#1744438
Bog'liq
InterciewQuestionInEnglish


  1. What is Class ?

A ready-made template for creating objects of the same type with common characteristics.
Umumiy xususiyatlarga ega bir xil turdagi ob'ektlarni yaratish uchun tayyor shablon


  1. What is Object?

An example of a class. Many objects can be obtained from one class


  1. What is field?

Properties of Object. Field - a variable that is needed to fill in the data in the Class. An example of the fields inside the Person class: name, surname, age


  1. What is Aggregation?

Using one class as a field of another class


  1. == is an operator that checks that values are equal and that memory addresses are also the same

equals-values are checked for equality and this method(function)


  1. Lazy and lateint var

Lazy - We declare an object but do not create it. that object is created wherever it is used. Not created if not used.

latenit var - It means that I will initialize an object later. If we don't initilize and try to use it, it throws a not initilization exeption




  1. Mutable and Immutable?

Mutable - The values inside can be changed
Immutable - the data inside a variable of this type cannot be changed


  1. Primitive and Non-Primitive data types

primitive data types - Immutable variables created with a programming language are: int, long, byte, short, char, float, double, boolean

non primitive data types - a data type created by programmers themselves for the convenience of other programmers using primitive data types.




  1. Nested function

We can write a function inside another function The nested functions are scoped to outer functions — only outer functions can have the nested functions. Inner functions are protected from everything that is happening outside the function.


  1. Sealed class

A sealed class in Kotlin holds several values. These values can belong to any type, such as data class, object, regular class, or other sealed classes. In general, a sealed class is an extended version of the ENUM class, i.e. There are additional options. ENUM class values are constant values, but one value of sealed class can have several objects. SEALED class can accept generic type, but ENUM class does not have this feature.


  1. ArrayList And LinkedList?

Arraylist under the hood uses array i.e. int[],
And LinkedList stores each object-based value as a Node object


  1. What is Intent?

Intent is needed to exchange data between activities to move from one activity to another. Intent is used to exchange information not only in activities but also in broadcast receiver, service, content provider


  1. What is Service?

Service is a program component that can perform long-term operations in the background. It does not provide a user interface. … For example, a service may perform network transactions, play music, perform file I/O, or interact with a content provider.


  1. What is Background Service?

A background service is a type of service that does not need to show the result to the user, such as data synchronization, table or data storage, background services stop when the application exits.


  1. What Foreground Services?

Services that inform the user about ongoing operations are called Foreground Services. Users can interact with the service through notifications provided about a task in progress. For example, when downloading a file, the user can monitor the download progress and can pause and resume the process. The foreground service works even if the user is not logged into the program.


  1. What is Abstraction?

In an abstract class, we can write abstract or non-abstract functions that all of its children can do. You cannot get an object from an abstract class. The main function of abstraction is to emphasize the importance of the result of a function, that is, what happens inside it is not interesting to the user.


  1. What is Encapsulation?

Encapsulation is a mechanism to restrict direct access to some components of an object. In this case, users cannot directly access all variables of a particular object when setting or retrieving values. Encapsulation is used to hide the members and functions (properties) of an object.
Download 9.53 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling