Difference between Vector and ArrayList
Vector are synchronized . Any method that touches the vectors are thread safe . but thread safe will incur perfomance issue, which cause you to cost you more. Whereby ArrayList are not synchronized which is better to be use if you dont concern on the thread safe. Both Vector and Array List will grow internally, and is good for retrieving element in specific position. This will also will cause performance issue. Better to use Linked list if you want to get access to the element at any position.
Difference between Hash Map and Hash Table?
Hash Map allows null value to be key and its not synchronized where else Hash table is synchronized and doesn't permit null value.
What is the meaning of Vector is synchronized in java?
It means multiple thread can safely read/modify data at the same time. But if you want to do this using Array list, then exception been thrown and incorrect data can be stored.When we Talk about Design Pattern
Singleton is one a design PatternAdvantage and Disadvatange
Singleton define on only having one instance on a java class with having a global point to access it.
What is the meaning of CPU 100 %?
CPU 100% means.. system resource fully utillized..some codes or processing will take up alot of resource which is not good.it is possible you don't don't have enough memory, or cheap memory, a 5400 MB or slower hard drive, a memory defect, inadequate video cardmemory, a failing hard drive, som...e other hardware problem, or too many
software programs loading. More to be said.. Your coding is poor
What is static variable and static method?
static variables are classes variables not instance
variables .They are instantianted only once for a
class.They are initialised at class load time.
Static method can be referenced with the name of the name
of the particular object of that class. That's how the
library methods like System.out.println works
Basic Java on the OOP ( object Oriented Programming)
class is a template or specification.Class has member methods and member variable
in it. Car is a class you cant see but you can see Toyota Vios
therefore class is a base and Toyota Vios is a object. instance of the class.
object everything that you see that has properties or attribute is a object, well Toyota Vios in silver color and high speed and petrol engine, therefore Toyota Vios is a object.this objects are created in class
during run time.so as conclusion object has state and behavior.
well by now, you should understand that , the object resides in the class and class has
its object's method and its variable...
well lets say to build car you need a blueprint, that specifies the perfect combination and
vital things to manufacture a car...well if combination are in correct figure so manufacturing would be in perfect design So this same method is used to produce thousands and thousand of car
1. Abstraction is enability,well bout abstraction you dont have to have deep knowledge on some method achieving information without having deep knowledge about it.
Often, the superclass will be set up as an abstract class which does not allow objects of its prototype to be created. In this case, only objects of the subclass are used. To do this the reserved word abstract is included in the class definition.Abstract methods are methods with no body specification.
2.Encapsulation, is also a mechanism...well think of capsule.. the medicine capsule of course..
well you can see black + red cap join together to become a capsule well. encapsulation is a
mechanism to bundle or bind data and method in one single unit.like the setter and getter method
la encapsulating everything needly.everything written in curly bracket is encapsulating.
and another thing dont set in your head encapsulation is information hiding, cause it is not.
3. Polymorphism-is a mechanism,many forms with same name but different behavior.
They are two types when we talking about polymorphism.
Overloading and Overriding.
Overloading - having method with the same name, different parameter list.
Overriding - having method with the same name and the list of parameter list is same and the return types are same.
4.Inheritance, well like mag and my mom... what i am i got inherited some from my mom and very lil from my dad, that is how it works, inheritance is about generating new class from the existing one,well my mom and dad generate maggie..hahahha... multiple inheritance is not possible in java but it can be achieved using implements interface.so you dont have to create a new class just inherit the class so that, this maggie will have some
extra features ..
The concept of inheritance greatly enhances the ability to reuse code as well as making design a much simpler and cleaner process.
In JAVA THERE IS NO MULTIPLE INHERITANCE, SO WE USE INTERFACES
Message Broker (MQ) to be continued