<< < 119 120 121 122 123 124 125 126 127 128 129 > >>   Sort: Date

What is the Set interface?
What is the Set interface? The Set interface provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements.
2012-08-02, 2679👍, 0💬

How do you give functions private variables that retain their values between calls?
How do you give functions private variables that retain their values between calls? Create a scope surrounding that sub that contains lexicals. Only lexical variables are truly private, and they will persist even when their block exits if something still cares about them. Thus: { my $i = 0; sub next...
2013-09-25, 2677👍, 0💬

What state does a thread enter when it terminates its processing?
What state does a thread enter when it terminates its processing? When a thread terminates its processing, it enters the dead state.
2012-09-20, 2677👍, 0💬

How do I read command-line arguments with Perl?
How do I read command-line arguments with Perl? With Perl, command-line arguments are stored in the array named @ARGV. $ARGV[0] contains the first argument, $ARGV[1] contains the second argument, etc. $#ARGV is the subscript of the last element of the @ARGV array, so the number of arguments on the c...
2013-09-19, 2675👍, 0💬

What is synchronization and why is it important?
What is synchronization and why is it important? With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of...
2012-05-31, 2675👍, 0💬

How do you connect to the database from JSP?
How do you connect to the database from JSP? A Connection to a database can be established from a jsp page by writing the code to establish a connection using a jsp scriptlets. Further then you can use the resultset object "res" to read data in the following way.
2013-08-08, 2674👍, 0💬

Binary value in Switch case
Is it possible to pass a binary value to 'case' of 'switch' statement?The control value which we are using to test is also binary. switch(binary value) { case 0000: System.out.println(" "); break; case 0001: System.out.println(" "); break; }
2014-02-20, 2670👍, 0💬

What is the difference between final, finally and finalize?
What is the difference between final, finally and finalize? Short answer: final - declares constant finally - relates with exception handling finalize - helps in garbage collection If asked to give details, explain: final field, final method, final class try/finally, try/catch/finally protected void...
2012-09-03, 2669👍, 0💬

What is multi-threading?
What is multi-threading? Multi-threading means various threads that run in a system.
2012-06-08, 2669👍, 0💬

If a class is located in a package, what do you need to change in the OS environment to be able to use it?
If a class is located in a package, what do you need to change in the OS environment to be able to use it? You need to add a directory or a jar file that contains the package directories to the CLASSPATH environment variable. Let's say a class Employee belongs to a package com.xyz.hr; and is located...
2012-05-28, 2669👍, 0💬

Can a .java file contain more than one java classes?
Can a .java file contain more than one java classes? Yes, a .java file contain more than one java classes, provided at the most one of them is a public class.
2013-06-24, 2668👍, 0💬

What is new with the stop(), suspend() and resume() methods in JDK 1.2??
What is new with the stop(), suspend() and resume() methods in JDK 1.2?? The stop(), suspend() and resume() methods have been deprecated in JDK 1.2.
2012-09-18, 2668👍, 0💬

Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?
Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written? Yes, it does. The FileNoFoundException is inherited from the IOException. Exception's subclasses have to be caught first.
2012-06-13, 2668👍, 0💬

Can Java object be locked down for exclusive use by a given thread?
Can Java object be locked down for exclusive use by a given thread? Yes. You can lock an object by putting it in a "synchronized" block. The locked object is inaccessible to any thread other than the one that explicitly claimed it.
2012-06-11, 2668👍, 0💬

What is the preferred size of a component?
What is the preferred size of a component? The preferred size of a component is the minimum component size that will allow the component to display normally.
2012-06-06, 2668👍, 0💬

How many ways can we express string in Perl?
How many ways can we express string in Perl? Many. For example 'this is a string' can be expressed in: "this is a string" qq/this is a string like double-quoted string/ qq^this is a string like double-quoted string^ q/this is a string/ q&this is a string& q(this is a string)
2013-09-25, 2667👍, 0💬

Can an anonymous class be declared as implementing an interface and extending a class?
Can an anonymous class be declared as implementing an interface and extending a class? An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.
2012-06-28, 2665👍, 0💬

When should the method invokeLater()be used?
When should the method invokeLater()be used? This method is used to ensure that Swing components are updated through the event-dispatching thread.
2012-06-29, 2661👍, 0💬

How many methods in Object class?
How many methods in Object class? This question is not asked to test your memory. It tests you how well you know Java. Ten in total. clone() equals() & hashcode() getClass() finalize() wait() & notify() toString()
2012-06-29, 2660👍, 0💬

What restrictions are placed on the values of each case of a switch statement?
What restrictions are placed on the values of each case of a switch statement? During compilation, the values of each case of a switch statement must evaluate to a value that can be promoted to an int value.
2012-12-04, 2659👍, 0💬

How do I do &lt; fill-in-the-blank &gt; for each element in an array?
How do I do &lt; fill-in-the-blank &gt; for each element in an array? #!/usr/bin/perl -w @homeRunHitters = ('McGwire', 'Sosa', 'Maris', 'Ruth'); foreach (@homeRunHitters) { print "$_ hit a lot of home runs in one year\n"; }
2013-09-16, 2657👍, 0💬

What do you understand by Synchronization?
What do you understand by Synchronization? Synchronization is a process of controlling the access of shared resources by the multiple threads in such a manner that only one thread can access one resource at a time. In non synchronized multithreaded application, it is possible for one thread to modif...
2012-05-22, 2657👍, 0💬

What is the difference between interface and abstract class?
What is the difference between interface and abstract class? interface contains methods that must be abstract; abstract class may contain concrete methods. interface contains variables that must be static and final; abstract class may contain non-final and final variables. members in an interface ar...
2012-07-10, 2655👍, 0💬

Can a lock be acquired on a class?
Can a lock be acquired on a class? Yes, a lock can be acquired on a class. This lock is acquired on the class's Class object.
2012-06-05, 2649👍, 0💬

<< < 119 120 121 122 123 124 125 126 127 128 129 > >>   Sort: Date