Posts

Java Technology - 2018 - Questions

Can we overload main method ? Constructor returns a value but, what ? Can we create a program without main method ? What are the 6 ways to use this keyword ? Why multiple inheritance is not supported in java ? Why use aggregation ? Can we override the static method ? What is covariant return type ? What are the three usage of super keyword? Why use instance initializer block? What is the usage of blank final variable ? What is marker or tagged interface ? What is runtime polymorphism or dynamic method dispatch ? What is the difference between static and dynamic binding ? How downcasting is possible in java ? What is the purpose of private constructor? What is object cloning ? Why String objects are immutable? How to create an immutable class? What is string constant pool? What code is written by the compiler if you concat any string by + (string concatenation operator)? What is the difference between StringBuffer and StringBuilder class? Exercise: Fibonacci...

Java Technology - 2018 - OOPS Concept

Image
Object  means a real word entity such as pen, chair, table etc.  Object-Oriented Programming  is a methodology or paradigm to design a program using classes and objects. It simplifies the software development and maintenance by providing some concepts: Object Class Inheritance Polymorphism Abstraction Encapsulation Object Any entity that has state and behavior is known as an object. For example: chair, pen, table, keyboard, bike etc. It can be physical and logical. Class Collection of objects  is called class. It is a logical entity. Inheritance When one object acquires all the properties and behaviours of parent object  i.e. known as inheritance. It provides code reusability. It is used to achieve runtime polymorphism. Polymorphism When  one task is performed by different ways  i.e. known as polymorphism. For example: to convince the customer differently, to draw something e.g. shape or rectangle etc. In java, we use ...