priyabrata patro


{ City } hyderabad
< Country > india
* Profession *
User No # 23501
Total Questions Posted # 2
Total Answers Posted # 12

Total Answers Posted for My Questions # 1
Total Views for My Questions # 9237

Users Marked my Answers as Correct # 56
Users Marked my Answers as Wrong # 13
Questions / { priyabrata patro }
Questions Answers Category Views Company eMail

How to establish connection with oracle database software from c language?

C 1762

how does printf function work

1 C 7475




Answers / { priyabrata patro }

Question { 3707 }

What is a compilation unit?


Answer

Compilation unit is .class file , i mean to say here
let's assume that below class as an instance
class Demo
{
public static void main(String args[])
{
System.out.println("hello");
}
}
//>javac Demo.java
once this is executed you will have Demo.class file which is compilation unit for jvm.

Is This Answer Correct ?    2 Yes 0 No

Question { 13394 }

Explain method overloading and overriding?


Answer

Method overloading happens in class with same method name but by modifying below features
1> By changing number of parameters
2> By changing ordinal position of parameter , i mean to say here is by changing datatype place.
And method overriding happens in two or more than two class , i mean defining same method declaration without any modification within two class and among of that two class , one class must extend another class and further also you can override this method , and this procedure continues till one subclass leaves overriding this method.

Is This Answer Correct ?    5 Yes 0 No


Question { 9444 }

what is java


Answer

java is one type of language through which you can achieve anything , i mean to say here recent version of java supports certain feature through which you can do anything why because you can implement c features in java ,so , c is known as robust language and nothing can not be done by this c except data security which is supported by java.
java is object oriented language but not oops concept,
because it supports oops concept but not fully because still it uses primitive type.And remember that oops concepts are only encapsulation , polymorphism, inheritance. And java is also an ocean . java is an abstract language. java is simple language i mean to say here which increases overhead that is not supported by java.

Is This Answer Correct ?    0 Yes 0 No

Question { CTS, 16001 }

whats is inheritance?


Answer

inheritance , name only mentions here that inherit.Listen inherit means it can be occupied by another one like father properties go to his sons, observer some automobiles you can get inheritance meaning there only ,like hero honda passion and passion plus , so , there are a lot of instance available which are related to inheritance.
So, inheritance is nothing but ,in programming language, occupying the properties of one class by another class.
for instance
public class Idemo{
public staic void m(){}
public void m1(){}
}
public class Idemo1 extends Idemo
{
public static void main(String args[]){
Idemo1 i=new Idemo1();
i.m();
i.m1();
}
}
but here it can not be called as inheritance
interface I{void fun1()}
interface I1
{void fun();}
interface I2 extends I,I1
{}

Is This Answer Correct ?    0 Yes 0 No

Question { 30456 }

What is difference between static method and static
variable?


Answer

first let us see what is method and variable.
method is nothing but a functionality which is collection of statement.But variable is a container which contains data.
second is what is the usage of static keyword.
By using static keyword you can save memory , i mean if you declare one non static member than while creating object it will occupie memory but once you have declared one member as a static , it will not allocate memory number times rather than once.
ok , now let us find out about our question.
static mehod contains statements and where exactly you can use static variable.And it can be invoked by any methods only.
And static variable contains data which can be modified by any methods.And it can be used by method and also other variable. And one main thing about static variable is you can declare a static member as local variable.

Sorry , i could not be able to declare about static . ok , if you want to know more than contact me in this mail id priyabrata.try@gmail.com

Is This Answer Correct ?    13 Yes 1 No

Question { TCS, 5617 }

which scenarios we go for jdbc,and which scenario we go for
connection polling and wat r advantages and disadvantages
using connection pooling.


Answer

See from first onwards i am speaking
there are two types of connection object one is Direct
Connection object and second is Pooled connection object
The object which is created,managed ,destroyed manually is
called as Direct connection object and if connection object
is collected from connetion pool is called as Pooled
connection object
now let us see each very clearly
When ever we try to create connection object than new
connection will be created ,ok,now when new clint will come
dynamically than he will use readily available connection
object to have interaction with underlying database
software,now , suppose multiple clients will come to use
connection object than what happens, Since, we have only one
connection object than we can provide service to one client
at time , i mean second client has to wait till first client
completes his work , think about large scale application, i
mean if more than two clients will come to use this
connection object e.g. Banking application .Definitely one
connection object can not provide service to multiple
clients , see , it can provide but will take much time to
provide service .ok, now think about our passions ,hardly
how much time we can wait for twenty thirty or forty minutes
but if it exceeds than what will happen , suddenly you will
leave that bank and will close account and which will , in
turn , mishap on organisation who has developed that project.
So , we have to provide service right there exactly
connection pool will come on to the picture.ok, so it is
highly recommended to work with connection pool concept.
now another thing is jdbc see
jdbc is a specification given by sun microsystem and it is
again devided into four types and jdbc connection pool
concept is coming under type-3 ok so don't use jdbc term
separately rather than use type-1 or type-2 or type-4 and my
recommendation is to work with type-4 driver only.
Before going to advantage and disadvantage first what is
conncetion pool?
connection pool is a pool which contains set of readyily
available conncetion objects which can provide service to
more number of clients using less number of conncetion
object.e.g. think about our college , what happens here.
each student occupies chair to seat provided by
administratator , if administrator tells each student to
bring his own chair than what will happen just think and
compare it exactly with Direct connection object ok.
now come to chairs provided by administrator i mean they
think that each session will contain 100 students and
providing 100 chairs at a time and providing service to more
than 100 students.how, each session will contain 100
students so how many sessions can be conducted per day .now,
just imagine how connection pool is compatible with given
example.
Advantage
---------
->Advantage what i have given above not only that programmer
should think it is burden of creating , managing ,destroying
conncetion object , each task responisbility will be taken
care by connection pool
Disadvantage
------------
->I hope you will not get any disadvantage from connection pool
for more information call 9989683928 , i belong to hyd

Is This Answer Correct ?    5 Yes 0 No

Question { Virtusa, 9156 }

what is multithreading?


Answer

at first ,let us know what is thread . Thread is also a functionality which executes concurrently with other of the program ,unlike general function.
Now let us see what is multithreading , executing mutiple thread simultaneously is called as multithreading.

Is This Answer Correct ?    5 Yes 0 No

Question { 10470 }

what is the use of finalize()Method
please explain with an example


Answer

Once object is created than as java does not support delete keyword to delete the object , so , just imagine in our program when we create number of object than how it is deleted how memory occupied by this object recycled.
So,thankfully java supports gargage collector which is a program in jvm ,listen jvm is also a collection of program and garbage collector is one of them. Thus garbage collector is purely under cotrol of jvm .
So , now let us see what is the usage of finalize method .
When you go on creating the object , object occupies memory
and as memory is not infinite than you are prohibited to go on beyond the memory , but at that instance your program needs to have an object and memory is not available .So, there exactly we need finalize method to force garbage collector to recycle unused memory.
And you can say that as garbage collector is working why we need to use finalize method . As mentioned earlier that garbage collector is purely under control of jvm ,so jvm decides when it should work.okkk

Is This Answer Correct ?    8 Yes 6 No

Question { 7012 }

what is main difference b/w abstract class and interface


Answer

listen in fact, java supports three types of structure. And they are fully implemented structure , fully unimplemented structure and partially implemented and unimplemented structure .
Now what is abstract class?
abstract class is one type of structure where exactly you can find both implemented and unimplemented method.I mean to say here it is partially implemented and unimplemented structure.So , usage of this class is to allow subclass to fullfill his own requirement by overriding abstract method defined in abstract class.And if you want to know complete information about abstract class you can contact to me in this email id priyabrata.try@gmail.com.

Now what is interface ?
interface is fully unimplemented structure where only unimplemented methods can be found out.And purpose to use this interface is to achieve run time polymorphism .
Now you will tell me that(run time polymorphism) also can be achieved by abstract class . Obviously , you can but you can not create object of interface but you can create object of abstract class by subclass (if it is a class).

Is This Answer Correct ?    0 Yes 1 No

Question { 10385 }

what is the purpose of class "Object" which is base class
for all classes?


Answer

listen first , when you create object of one class which is not extending any class than , instead of one object , two object will be created and that is nothing but object of Object class and one more thing is no object is created with out it's superclass. So, object of subclass can not be created without it's superclass where Object class comes into picture because by default compiler gives Object class as superclass to all class which is not extending any class at compilation time itself.

Is This Answer Correct ?    4 Yes 2 No

Question { 5401 }

Is JDBC a language or Application?


Answer

JDBC is neither a language nor an application.
Than what is it?
It is a specification given by sun microsystem .You just
think about while you are working with JDBC concept you are
commonly using certain objects like Connection,Statement etc.
If it was not a specification than we would have to refer
each drivers information.
And about application see you are using JDBC concept to
create JDBC application but it is not itself an application
, and about language since it is part of java than you can
say it is sub-technology of java.

Is This Answer Correct ?    5 Yes 3 No

Question { 8193 }

Hi friends, In JDBC 4 drivers are there among this which
driver is best and why it is best.Which driver is most
commonly used in web applications.


Answer

ok , friend see ,there are three drivers and one protocol
which is type-3 ,ok.
My recommendation is to use type-4 dirver , why , because
it has seveal advantages than the predecessor drivers.
Advantages
----------
->It is directly interacting with database software.
->It does not need much conversions to be included.
->It is compatible with internet program and applet programs
like this many advantages are there list will go on.
ok, now , if you are developing 2-tier project than use
type-4 dirver , if it is web application than use type-3
with type-4 ok
for more information call 9989683928 , i belong to hyd

Is This Answer Correct ?    9 Yes 0 No