YES , java is a pure OOPS(Object Oriented Programming)as in
JAVA all the app can be perform under classes only which
supports
encapsulation,polymorphism,inheritance,interfaces,abstractio
n etc.
No java isnt 100% pure OOPS coz if it were then everything
should be classes and objects, whereas java still has
primitive data type which violates the above said
statement...SmallTalk is the only 100% pure OOPS language
java is not 100% oops because of only reason it has static
keyword, according to oops and in real world we need an
object to perform a function but in java using class name
without an object we can perform function or call a method
this violates oops and real world reflection..
No. Java is not 100 % Pune OOP because of following three
reasons:
1) It doesnot support Multiple inheritance.
2) It allows use of primitive data types which are not an
objects.
3) It allows static methods to call without creating the
instance. This disobeys OOPs concepts.
java is not 100% oops because of only reason it has static
keyword,
according to oops and in real world we need an
object to perform a function but in java using class name
without an object we can perform function or call a method
this violates oops and real world reflection..
NO Java is not purely Oops bcaz of
1) AWT makes java code dependent..
AWT Uses Windows component which means java is depending
on OS components which makes it dependant
BUT Swings are introduce to make it independant
2) Primitive data type such as int makes java dependant
But Wrapper classes such as Integer make it independant
Becaz of abov 2 reasons java is dependant....
why we import both packages java.awt.*; and java.awt.event.*;
as java.awt.*; can import all classes na. then what is the
need of importing java.awt.event.*; ?
What is the need to implement Serializable interface (with
no methods) for objects which are to be serialized ?
We can write our own functionality which writes objects to
streams then why we need to implement and tell JVM that
which objects can be serialized.
class A{
some variables;
public void a()throws Excepion1,Exception2{....}
}
class B extends A{
variables...
public void a()throws E2,E3{.....}
}
Qns:
here override of methods occurs or not,ore else wil give
any compilation error or run properly..plz tell me briefly
whts happening with the above codes....
Consider that class classA, abstract class classB, and
final classC have been defined.Which one of the following
is correct?
1. classA extends classC implements classB
2. class A extends classB, classC
3. classA extends classB
4. classB implements classC
I have one POJO class(Java bean class), it has two
variables for that it has setters and getters. Now i have
created two objects for that class and i have set the data
for those variables through this two objects. Now question
is i want check whether those two objects have same data or
not, for this write a program? Thanks, Bose.