<< < 143 144 145 146 147 148 149 150 151 152 153 > >>   Sort: Date

What is the difference between a constructor and a method?
What is the difference between a constructor and a method? A constructor is a member function of a class that is used to create objects of that class. It has the same name as the class itself, has no return type, and is invoked using the new operator. A method is an ordinary member function of a cla...
2013-04-29, 2088👍, 0💬

When to Use the Throughput Collector?
When to Use the Throughput Collector? Use the throughput collector when you want to improve the performance of your application with larger numbers of processors. In the default collector garbage collection is done by one thread, and therefore garbage collection adds to the serial execution time of ...
2013-03-25, 2088👍, 0💬

What methods are used to get and set the text label displayed by a Button object?
What methods are used to get and set the text label displayed by a Button object? getLabel() and setLabel()
2013-01-30, 2087👍, 0💬

What is the difference between a field variable and a local variable?
What is the difference between a field variable and a local variable? A field variable is a variable that is declared as a member of a class. A local variable is a variable that is declared local to a method.
2012-12-25, 2085👍, 0💬

How to read from a pipeline with Perl
How to read from a pipeline with Perl Example 1: To run the date command from a Perl program, and read the output of the command, all you need are a few lines of code like this: open(DATE, "date|"); $theDate = &lt;DATE&gt;; close(DATE); The open() function runs the external date command, the...
2013-09-05, 2081👍, 0💬

If you're overriding the method equals() of an object, which other method you might also consider?
If you're overriding the method equals() of an object, which other method you might also consider? hashCode()
2013-04-15, 2080👍, 0💬

What is a marker interface ?
What is a marker interface ? An interface that contains no methods. Eg: Serializable, Cloneable, SingleThreadModel etc. It is used to just mark java classes that support certain capability.
2013-03-11, 2079👍, 0💬

How can we make a class Singleton
How can we make a class Singleton A) If the class is Serializable class Singleton implements Serializable { private static Singleton instance; private Singleton() { } public static synchronized Singleton getInstance() { if (instance == null) instance = new Singleton(); return instance; } /** If the ...
2013-03-18, 2077👍, 0💬

Why can't I say just abs() or sin() instead of Math.abs() and Math.sin()?
Why can't I say just abs() or sin() instead of Math.abs() and Math.sin()? The import statement does not bring methods into your local name space. It lets you abbreviate class names, but not get rid of them altogether. That's just the way it works, you'll get used to it. It's really a lot safer this ...
2013-02-15, 2077👍, 0💬

What is Session Facade pattern?
What is Session Facade pattern? Session facade is one design pattern that is often used while developing enterprise applications. It is implemented as a higher level component (i.e.: Session EJB), and it contains all the iteractions between low level components (i.e.: Entity EJB). It then provides a...
2013-03-15, 2075👍, 0💬

How does a try statement determine which catch clause should be used to handle an exception?
How does a try statement determine which catch clause should be used to handle an exception? When an exception is thrown within the body of a try statement, the catch clauses of the try statement are examined in the order in which they appear. The first catch clause that is capable of handling the e...
2013-01-28, 2075👍, 0💬

How do I do &lt; fill-in-the-blank &gt; for each element in a hash?
How do I do &lt; fill-in-the-blank &gt; for each element in a hash? Here's a simple technique to process each element in a hash: #!/usr/bin/perl -w %days = ( 'Sun' =>'Sunday', 'Mon' => 'Monday', 'Tue' => 'Tuesday', 'Wed' => 'Wednesday', 'Thu' => 'Thursday', 'Fri' => 'Friday', 'Sat' => 'Satur...
2013-09-03, 2073👍, 0💬

What is the output of the following Perl program?
What is the output of the following Perl program? 1 $p1 = "prog1.java"; 2 $p1 =~ s/(.*)\.java/$1.cpp/; 3 print "$p1\n"; prog1.cpp
2013-08-30, 2073👍, 0💬

What will be the output on executing the following code...
What will be the output on executing the following code... What will be the output on executing the following code. public class MyClass { public static void main (String args[] ) { int abc[] = new int [5]; System.out.println(abc[0]); } } A Error array not initialized B 5 C 0 D Print some junk chara...
2013-03-11, 2072👍, 0💬

What is the difference between Debug.Write and Trace.Write? When should each be used?
What is the difference between Debug.Write and Trace.Write? When should each be used? Answer1: The Debug.Write call won’t be compiled when the DEBUG symbol is not defined (when doing a release build). Trace.Write calls will be compiled. Debug.Write is for information you want only in debug builds...
2014-02-24, 2071👍, 0💬

Advantages of migrating to VB.NET ?
Advantages of migrating to VB.NET ? Visual Basic .NET has many new and improved language features — such as inheritance, interfaces, and overloading that make it a powerful object-oriented programming language. As a Visual Basic developer, you can now create multithreaded, scalable applications u...
2013-10-03, 2068👍, 0💬

Why isn't there operator overloading?
Why isn't there operator overloading? Because C++ has proven by example that operator overloading makes code almost impossible to maintain. In fact there very nearly wasn't even method overloading in Java, but it was thought that this was too useful for some very basic methods like print(). Note tha...
2013-02-08, 2068👍, 0💬

What are the advantages and drawbacks of using ADO.NET?
What are the advantages and drawbacks of using ADO.NET? Pros ==== ADO.NET is rich with plenty of features that are bound to impress even the most skeptical of programmers. If this weren’t the case, Microsoft wouldn’t even be able to get anyone to use the Beta. What we’ve done here is come ...
2013-12-13, 2066👍, 0💬

Which methods of Serializable interface should I implement?
Which methods of Serializable interface should I implement? The serializable interface is an empty interface, it does not contain any methods. So we do not implement any methods.
2013-05-20, 2065👍, 0💬

What are different types of inner classes?
What are different types of inner classes? Nested top-level classes, Member classes, Local classes, Anonymous classes Nested top-level classes- If you declare a class within a class and specify the static modifier, the compiler treats the class just like any other top-level class. Any class outside ...
2013-05-13, 2064👍, 0💬

What is a compilation unit?
What is a compilation unit? A compilation unit is a Java source code file.
2013-01-11, 2063👍, 0💬

What's the best way to write a multi-statement macro?
What's the best way to write a multi-statement macro? The usual goal is to be able to invoke the macro as if it were an expression statement consisting of a function call: MACRO(arg1, arg2); This means that the ``caller'' will be supplying the final semicolon, so the macro body should not. The macro...
2016-02-22, 2061👍, 0💬

If we develop an application that must accommodate multiple security levels through secure login and ASP.NET web application is
If we develop an application that must accommodate multiple security levels through secure login and ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users? If we develop an application t...
2014-08-27, 2061👍, 0💬

Name few Garbage collection algorithms?
Name few Garbage collection algorithms? Here they go: Mark and Sweep Reference counting Tracing collectors Copying collectors Heap compaction Mark-compact collectors
2013-03-20, 2058👍, 0💬

<< < 143 144 145 146 147 148 149 150 151 152 153 > >>   Sort: Date