All Posts (Boch)What's Prototypes for JavaScript? |
||
|---|---|---|
|
Just can't stay away
![]()
Joined:
2007/11/11 12:07 Group:
Registered Users Posts:
100
Level : 9; EXP : 0
HP : 0 / 200 MP : 33 / 1192 ![]() |
What's Prototypes for JavaScript?
Objects have "prototypes" from which they may inherit fields and functions.
Posted on: 11/20 14:16
|
|
Transfer
|
||
Question: Difference between a Java interface and a Java abstract class? |
||
|---|---|---|
|
Just can't stay away
![]()
Joined:
2007/11/11 12:07 Group:
Registered Users Posts:
100
Level : 9; EXP : 0
HP : 0 / 200 MP : 33 / 1192 ![]() |
Question: Difference between a Java interface and a Java abstract class?
Answer: 1. Methods of a Java interface are implicitly abstract and cannot have implementations. A Java abstract class can have instance methods that implements a default behavior. 2. Variables declared in a Java interface is by default final. A Java abstract class may contain non-final variables. 3. Memebers of a Java interface are public by default. A Java abstract class can have the usual flavors of class members like private, protected, etc.. 4. Java interface should be implemented using keyword “implements”; A Java abstract class should be extended using keyword “extends”. 5. An interface can extend another Java interface only, an abstract class can extend another Java class and implement multiple Java interfaces. 6. A Java class can implement multiple interfaces but it can extend only one abstract class. 7. Interface is absolutely abstract and cannot be instantiated; A Java abstract class also cannot be instantiated, but can be invoked if a main() exists. 8. In comparison with java abstract classes, java interfaces are slow as it requires extra indirection.
Posted on: 11/13 13:35
|
|
Transfer
|
||
unescape(), escape() |
||
|---|---|---|
|
Just can't stay away
![]()
Joined:
2007/11/11 12:07 Group:
Registered Users Posts:
100
Level : 9; EXP : 0
HP : 0 / 200 MP : 33 / 1192 ![]() |
unescape(), escape()
These are similar to the decodeURI() and encodeURI(), but escape() is used for only portions of a URI.
Posted on: 11/6 15:44
|
|
Transfer
|
||
Question: Does Java garbage collection guarantee that a program will not run out of memory? |
||
|---|---|---|
|
Just can't stay away
![]()
Joined:
2007/11/11 12:07 Group:
Registered Users Posts:
100
Level : 9; EXP : 0
HP : 0 / 200 MP : 33 / 1192 ![]() |
Question: Does Java garbage collection guarantee that a program will not run out of memory?
Answer: No. Java Programs may use up memory resources faster than they are garbage collected. A Java program can create objects that are not subject to garbage collection.
Posted on: 10/30 17:52
|
|
Transfer
|
||
Java garbage collection |
||
|---|---|---|
|
Just can't stay away
![]()
Joined:
2007/11/11 12:07 Group:
Registered Users Posts:
100
Level : 9; EXP : 0
HP : 0 / 200 MP : 33 / 1192 ![]() |
Java garbage collection
Answer: Garbage collection in Java is to discard objects that are no longer needed and to reclaim their resources. A Java object is subject to garbage collection when it is out of scope of the control flow of the program.
Posted on: 10/23 15:29
|
|
Transfer
|
||
C++ interviewe question,if you can work well, you will be hire at level 3 or above |
||
|---|---|---|
|
Just can't stay away
![]()
Joined:
2007/11/11 12:07 Group:
Registered Users Posts:
100
Level : 9; EXP : 0
HP : 0 / 200 MP : 33 / 1192 ![]() |
C++ interviewe question,if you can work well, you will be hire at level 3 or above.
I have interviewed several candidates specifically focusing on their C++ knowledge, and if there was one question that worked well to put peoples' knowledge of C++ on a gradient, it was this one: Fix this memory leak as robustly as you can: void doSomething() { Foo* pFoo = new Foo(); [do some stuff] } * +1 for putting delete pFoo at the end * +2 for putting pFoo in a std::auto_ptr * +3 for knowing what RAII is - the concept, if not the acronym * +4 for mentioning exception-safety guarantees of the auto_ptr * +5 for putting pFoo in a boost:shared_ptr * +6 for knowing when a shared_ptr might not be freed. * +7 for talking about garbage collection techniques to fix circular references This always worked to show how long someone had been working with C++. This is one datapoint you can use to tell where you are in the scale of C++ knowledge. Edit: I would recommend someone for hire at level 3 or above.
Posted on: 10/16 15:37
|
|
Transfer
|
||
Question: Java finalization |
||
|---|---|---|
|
Just can't stay away
![]()
Joined:
2007/11/11 12:07 Group:
Registered Users Posts:
100
Level : 9; EXP : 0
HP : 0 / 200 MP : 33 / 1192 ![]() |
Question: Java finalization
Answer: Finalization is to give an unreachable Java object the opportunity to perform any cleanup processing before the Java object is garbage collected. It happens when the Java object’s finalize() method is invoked.
Posted on: 10/9 13:53
|
|
Transfer
|
||
decodeURI(), encodeURI() |
||
|---|---|---|
|
Just can't stay away
![]()
Joined:
2007/11/11 12:07 Group:
Registered Users Posts:
100
Level : 9; EXP : 0
HP : 0 / 200 MP : 33 / 1192 ![]() |
decodeURI(), encodeURI()
Many characters cannot be sent in a URL, but must be converted to their hex encoding. These functions are used to convert an entire URI (a superset of URL) to and from a format that can be sent via a URI.
Posted on: 10/2 14:35
|
|
Transfer
|
||
Can an unreachable Java object become reachable again? |
||
|---|---|---|
|
Just can't stay away
![]()
Joined:
2007/11/11 12:07 Group:
Registered Users Posts:
100
Level : 9; EXP : 0
HP : 0 / 200 MP : 33 / 1192 ![]() |
Question: Can an unreachable Java object become reachable again?
Answer: Yes. It can happen when the Java object’s finalize() method is invoked and the Java object performs an operation which causes it to become accessible to reachable objects.
Posted on: 9/17 13:45
|
|
Transfer
|
||
What is new about Web services? |
||
|---|---|---|
|
Just can't stay away
![]()
Joined:
2007/11/11 12:07 Group:
Registered Users Posts:
100
Level : 9; EXP : 0
HP : 0 / 200 MP : 33 / 1192 ![]() |
What is new about Web services?
People have been using Remote Procedure Calls (RPC) for some time now, and they long ago discovered how to send such calls over HTTP. So, what is really new about Web services? The answer is XML. XML lies at the core of Web services, and provides a common language for describing Remote Procedure Calls, Web services, and Web service directories. Prior to XML, one could share data among different applications, but XML makes this so much easier to do. In the same vein, one can share services and code without Web services, but XML makes it easier to do these as well. By standardizing on XML, different applications can more easily talk to one another, and this makes software a whole lot more interesting.
Posted on: 9/10 14:13
|
|
Transfer
|
||



Transfer
