What do you think are the advantages of using Java?
Java is a high-level object-oriented programming language used for developing games, device systems, and applications.It is secure, fast, reliable, portable and platform independent.
2. What do you understand by Object and Class?
An object is understood as a collection of methods and classes which represent its state and executes operations.
A class is used to define new types of data which in turn is used to create objects.
3. What are JVM, JDK, and JRE?
• JVM (Java Virtual Machine) offers the runtime environment for codes to be executed.
• JRE (Java Runtime Environment) is the collection of files needed during runtime by JVM.
• JDK (Java Development Kit) is needed to write and execute a program and contains the JRE with necessary development tools.
4. What is meant by looping?
Loops are used to repeatedly execute a certain statement or block of statements.
They are of three types- For Loops, While Loops and Do While Loops.
5. What is the difference between Overloading and Overriding?
When you have two methods of the same name but having different properties, the case is called Overloading. On the other hand, Overriding refers to a situation where two methods with the same name and properties occur, but the two occurring in a parent and child class respectively.
6. What is Inheritance?
Inheritance allows you to let a derived class acquire the methods from a base class.
7. Is it possible to restrict Inheritance?
Yes, it is. You can restrict Inheritance by:
a. Using the final keyword.
b. Making the method final.
c. Using private constructor.
d. Using (//) Javadoc comment.
8. What do you mean by Content Negotiation?
Content negotiation occurs between you as a user and the host server. For instance, when you make an HTTP request you receive your result in different languages and formats, and you can specify what content you will accept back from the host in a negotiation of the type of content shared.
9. What is WORA?
WORA or Write Once Read Anywhere, is the property of a language to run on any platform. Java is allowed this property due to its bytecode nature. This is midway between machine code and source code and is thus not platform specific.
10. What is the function of ClassLoader?
You can use ClassLoader to load class files before running the java program.
11. What are static methods and static variables?
They are methods and variables shared by all the objects in a class. Their static nature is a character of the class and not the object itself.
12. What do you understand by the Object-Oriented Paradigm?
When your programming paradigm is dependent on objects containing data with methods defined within the class to which they belong, it is referred to as Object Oriented Paradigm.
13. Is there a difference between Object Oriented and Object-Based language?
Object Oriented languages such as Java and C++ follow all the concepts of an Object Oriented Program and do not have inbuilt objects.
Object-Based languages like JavaScript do not follow all OOPs concepts-such as inheritance-and do have I built objects.
14. What is the function of a constructor?
You can use constructors to initialize the state of any object. When you create a new object using a new keyword, a default constructor is invoked. This must have a name similar to the class name.
15. How do you use ‘this’ keyword?
You can use ‘this' to refer to a current object, invoke the current class method or class constructor. You can also pass it on as an argument into your methods or constructors.
16. What is aggregation?
It is a type of weak relation you can create between two classes, where one contain references to another class contained within it.
17. What is the purpose of composition?
You can use composition to hold the reference of one class within another class, and in this case, the contained object cannot exist without the class containing it. It is a type of aggregation.
18. What is annotation?
Annotation is a tag you use to symbolize metadata that represents your class, interface, and fields among others.
They are used by the compiler and the JVM and don’t directly influence the operations.
19. What is enumeration?
It is an interface you can use to access original data structure from which the enumeration is obtained.
20. What is the function of Synchronized Block?
While its scope is smaller than method, you can use it to lock an object for each shared resource.
21. What is Android?
Android is an open-source operating system and is mainly popular for Smartphones and Tablets.
This operating system is Linux Kernel-based. Using the Android operating system, the developer develops the functions or programs which can perform basic as well as the advanced type of operations on the Smartphone.
22. Explain Android Architecture briefly.
Android architecture is in the form of software stack components.
The below diagram describes the different layers in the Android architecture.
- Linux Kernel: Linux Kernel is placed at the bottom of the software stack and is the foundation of the Android architecture. Using Linux kernel, Android provides a connection between the other layers of the software. It helps to develop drivers like the keypad, display, audio for device manufacture, etc.
- Hardware Abstraction Layer (HAL): HAL provides an interface between device drivers and API framework. It consists of library modules that are specific to the hardware component.
- Android Runtime: Linux kernel provides a multi-tasking execution environment so that multiple processes can execute each process runs on its own instance of Android Runtime (ART). Android has core runtime libraries like Dalvik VM specific libraries, Java Interoperability Libraries, Android Libraries, and C/C++ libraries.
23. what is a context in android?
Context is used to create new components or objects like views and it is used to start activity and services. Android has two kinds of contexts and those are getContext() and getApplicationContext().
24. What is Bound Services? How it works?
A bound Service provide client-server interface. A bound service is the server in a client-server interface.
It allows components(such as activities) to bind to the service, send requests, receive responses, and perform interprocess communication(IPC).
A bound service typically lives only while it serve another application component and does not run in the background indefinitely.

Comments