Eliza sahoo

Greenhorn
+ Follow
since Jan 28, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Eliza sahoo

Old form of looping.

for (int i=0; i < nameArray.length; i++)
{
System.out.println("Name: " + array[i]);
}
With Java SE 5.0. an enhanced looping would be like

for (String name : nameArray)
{
System.out.println("Name: " + name);
}

where nameArray is an array of Strings

http://www.mindfiresolutions.com/Enhanced-for-loop-in-java-520.php
14 years ago
Below are additional examples of conversion from one data type to another in java.

double to String :
String str = Double.toString(i);

long to String :
String str = Long.toString(l);

float to String :
String str = Float.tString(f);

String to integer : str = "25";
int i = Integer.valueOf(str).intValue();
or
int i = Integer.parseInt(str);

String to double :
Double d = Double.valueOf(str).doubleValue();

String to long:
long l = Long.valueOf(str).longValue();
or
Long L = Long.parseLong(str);

String to float :
Float f = Float.valueOf(str).floatValue();

decimal to binary : int i = 42;
String bin = Integer.toBinaryString(i);

http://www.mindfiresolutions.com/Converting-datatype-in-Java-46.php
14 years ago
There are 4 steps to it, which are defined below:
Step 1: Download Tomcat plug-in.

Step 2: Close eclipse and place it inside plug-in folder of eclipse.

Step 3: open command prompt, go to eclipse home directory and type command eclipse -clean
e.g. E:\Eclipse3.2.1>eclipse -clean

Step 4: on eclipse, go to Preferences and then select Tomcat, select tomcat version you have installed and set the Tomcat home path.

Now the eclipse IDE is ready with Tomcat and we can start developing web applications/tomcat projects. We can start, stop and monitor Tomcat from eclipse.

Eliza
http://www.mindfiresolutions.com/A-tip-to-Configure-Tomcat-with-eclipse-IDE-416.php
Prefix operation is faster and better than to postfix operation.
Now let us see how both postfix and prefix work.

// postfix
iterator operator++(int)
{
iterator _Tmp = *this;
++*this;
return (_Tmp);
}

// prefix
iterator& operator++()
{
_Ptr = _Acc::_Next(_Ptr);
return (*this);
}
note: one integer dummy variable is used in postfix operation in order to distinguish weather it is a postfix operation or prefix operation. This dummy variable is never used.
(refer prefix / postfix overloading).

hope it would be helpful to all of you.
Any suggestions are appreciated.

Thanks
Eliza
http://bit.ly/aeuBqg