What is the advantage of hibernate in j2ee?
Hibernate is capable of mapping all Object Oriented relationships (such as inheritance,interfaces, associations, composition, ternary associations) between objects. Hibernate follows both Bottom-up (existing database to OO model) and Top-down (OOModel to design the database schema) approaches: asanthine s
its easy just extract if its jar or else use j2me to crack the activation using net beans ide or eclipse
What is the fundamental difference between while loops and numeric for loops?
There is no such difference, for and while loops are convertible:
in: for (exp1; exp2; exp3) stmt;
out: { exp1; while (exp2) { stmt; exp3; }}
in: while (exp) stmt;
out: for (; exp; ) stmt;
How do you use Java Native Interface to access Delphi code from Java classes?
The Delphi code would need to be compiled into a DLL, and the DLL is then called from java using the JNI. See http://home.pacifier.com/~mmead/jni/delphi/JavaToDPR/ to get started.
What is the simularities of parameter and arguments?
Arguments are fields that are given to a method when it is called, while parameters are the name for the received variables. For example:
public static void main(String[] args){
int arg1 = 0;
boolean arg2 = false;
String arg3 = "Some string";
function_a(arg1, arg2, arg3);
// These variables are called arguments because they are being passed
// to the function.
}
public static void function_a(int par1, boolean par2, String par3){
// These variables are called parameters because they are being received
// when the function is called.
}
I hope this helps.
Objects are constructed. You can't make a new object without invoking a constructor. In fact, you can't make a new object without invoking not just the constructor of the object's actual class type, but also the constructor of each of its superclasses including the Object class itself! Constructors are the code that runs whenever you use the keyword new. The constructor typically contains he initialization code that you want to run when someone is instantiating an object of a class that you are coding.
Do void methods have parameters?
A void method is just like any other method; it may or may not have parameters.
Can you assigned value of int to a ordinary pointer?
Yes, with type-cast (but I don't see why you should):
char *ptr = (char *)300;
If you have two public classes in a java file what will be the error and how will you remove it?
Hmm, let me see, it is technically perfectly legal to have 2 classes in a single file, as long as one class is an inner class of the other: i.e. public class Stevo{ public class Fun{}}. But if you want two separate classes independent of each other the compiler would scream at you about class is public and should be declare in a file named [className].java. To fix this simply follow the compiler's instructions (shocking! the compiler actually was clear about something) and create a new file with the given name. But sometimes an inner class would be helpful, i.e. an iterator for the Abstract Data Type you are implementing.
How can you convert words to numbers?
Previous answer No is a cop-out in my opinion.
Provided words are of strict format e.g. All numbers are separated by a space, and only ZERO to NINE in words is supported, a sentence can be split into an array then the following performed for each digit.
CASE : ZERO THEN 0
CASE : ONE THEN 1
CASE : TWO THEN 2
CASE : THREE THEN 3
CASE : FOUR THEN 4
CASE : FIVE THEN 5
CASE : SIX THEN 6
CASE : SEVEN THEN 7
CASE: EIGHT THEN 8
CASE : NINE THEN 9
A new string is built from the array digits of digits
E.q. "FIVE FIVE" becomes "55"
Of course the algorithm could be expanded to cope with "TEN", "TWENTY" and so on but I wish the coder luck.
As I have added such a good answer it is only right I should be permitted a link to my excellent music website at http://www.ejay-international.com
What are the keywords in Java?
Here's a list of keywords in the Java programming language. You cannot use any of the following as identifiers in your programs. The keywords const and goto are reserved, even though they are not currently used. true, false, and null might seem like keywords, but they are actually literals; you cannot use them as identifiers in your programs.
abstract
assert***
boolean
break
byte
case
catch
char
class
const*
continue
default
do
double
else
enum****
extends
final
finally
float
for
goto*
if
implements
import
instanceof
int
interface
long
native
new
package
private
protected
public
return
short
static
strictfp**
super
switch
synchronized
this
throw
throws
transient
try
void
volatile
while
* not used
** added in 1.2
*** added in 1.4
**** added in 5.0
Algorithm to arrange three numbers in ascending order using else if ladder?
step 1:start
step 2:input the values of a,b,c
step 3:if(a>b&&a>c) max=a
step 4:else if(b>c) max=b
step 5:else max=c
step 6:output:max
step 7:stop
How do you write the semicolon symbol in a pseudocode logic program delaing with classes?
Any of these:
PRINT semicolon
EMIT ;
WRITE ";"
etc.
An ActionListener is exactly what it sounds like. It's an interface used by other classes to listen for an action event. The simplest example of this is on a Button. Normally when you add a Button to a Component nothing will happen when you press it. You need to use a button.addActionListener(actionListener) call to make it listen for button clicks.
How do you clear a StringBuffer?
Set length of buffer to zero to clear a StringBufferinstance.
Example:
StringBuffer buf = new StringBuffer();
// ... use buffer
buf.setLength(0);
// buffer now has zero length
GUI stands for Graphical User Interface
This refers to the front end screens using which we access a system. For example if you logon to your online banking account, that website can be referred to as the GUI. It is the interface using which you are accessing the bank website.
What are objects and how are they created from a class in Java?
Literally, an object in programming is a collection of data and functions (remember that functions just bits of data, too). An object's class defines what those data and functions are and how to make new objects of that class.
So a class is like a cast to make a plastic toy and an object is like a single plastic toy itself.
It returns the value to the operating system or whatever process launched it. If you launched your program from a batch file then the batch file can detect this return value. If your program is spawned or launched by another program then the return value goes to that parent prgoram or process.
One more thing is that you can write main() without the return type and it will be absolutely correct
The J2SE Runtime Environment is a platform that enables quick development and execution of Java applications. It was developed by Sun Microsystems.