Win a copy of Rust Web Development this week in the Other Languages forum!

Rambabu Gonela

Greenhorn
+ Follow
since Jul 31, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rambabu Gonela

Hi friends,

my requirement is, I have to write standard output into catalina.out log file. I am trying with below approach
using Tomcat5.5

System.out.println(exception.getMessage());
StackTraceElement []error = exception.getStackTrace();
for(int i=0;i<error.length;i++)
{
java.lang.System.out.println(error[i]);
}

But its not writing into catalina.out log file, it contains only server information (start up and stop).

Please help on this
13 years ago
Hi Friends..

i am really confusing with this generics,

see the below example

class C{}
class A extends C{}
class Impl {
void method(){
ArrayList<? extends C> arl = new ArrayList<A>();
arl.add(new A());//compile time error;
}
}

why its giving compile time error , already arl is type A arrayList means we can store the A class Objects, right?...

really i am confusing this senario.. pls help me the same.....
please give me detail explanation

ok
thank you
13 years ago
HI friends,

i am new to spring technologies, i am getting one problem while creating application using spring tiles..

actually i have to divide page into 3 parts, 1)header 2)body 3)footer
in header i have menu item if i click(hyperlink) on menu item that related jsp has to display in body part. that body only has to refresh...

i developed this application but my problem is whenever i click on menu item that entire page is refreshing....

please help me friends....

Rambabu G
Hi Friends.. last year i completed scjp 1.4.. now i am preparing for SCWCD.. i need help from you..
i want scwcd material, [Request for illegal material removed - Peabody]

Thanks
[ April 25, 2007: Message edited by: Marc Peabody ]
In the real business world, there are many cases where we're required to perform sorting on a Collection of some user-defined objects. If the element of the Collection is a String type, or any other class which implements Comparable, then the sorting can be performed in the natural order. But sometimes, we want to perform a different criteria for sorting, or probably we want to sort a user-defined type.

Here's where Comparator comes into play. Clean and extensible.

Here's an example of a simplified user-defined type:



In the above class, the most commonly found as natural ordering would be order by lastName. This can easily be implemented using the Comparable interface, i.e.



Sorting a List of Customer objects would be as simple as:

Collections.sort (customerList);

But, if we want to use a different ordering, e.g. order by the first name, then we cannot use the natural ordering as defined within the Customer class. Instead, we have to define an alternative ordering, in the form of a Comparator class.



Sorting a List of Customer objects by their first name, would be:

// assuming you implement singleton..
Comparator comparator =
CustomerFirstNameComparator.getInstance();

Collections.sort (customerList, comparator);

Simple, clean & extensible. You can start defining more and more Comparator classes to suit your needs. As it is a Java class, you can also perform complex comparison on the objects.
14 years ago
Hi Ravindra

Here point object reference is using in rectangle Object, so its not eligible for GC.
14 years ago
Hello..

prepared statement in jdbc means its precompiled statement.. ok..i have one doubt .. where it will compile in java compiler or any other compiler.. and where it will store after compilation
Hello..

prepared statement in jdbc means its precompiled statement.. ok..i have one doubt .. where it will compile? in java compiler or any other compiler.. and where it will store after compilation
when connecting to database using drivers, database gets crashed then
server will be down,in that situation what we will do?
one month back i attend one interview.. that guy asked what does a class file consists of.. i replied " i dont know", he told that class file consists of byte code, i asked him.. then what interpreter do.. he replied ,it converts the class file into byte code, then again i asked ,already the class file consists byte code.. then why we again converting to byte code(interpreter).. he told don't give irrespective answers..

finally i am not selected .. ok thats is secondary thing

ok.. my question is what class file consist.. if class file consist byte code.. then what does java interpreter do?
15 years ago
Any object that implements the java.io.Serializable interface can be made as serialazable., that means JVM performs serialization internally...Similarly if i define a marker interface, how would JVM know what task to be performed on behalf of my marker interface. How should i intimate the JVM about the task that should be performed by it, if any object implements my marker interface?
15 years ago
Any object that implements the java.io.Serializable interface can be made as serialazable., that means JVM performs serialization internally...Similarly if i define a marker interface, how would JVM know what task to be performed on behalf of my marker interface. How should i intimate the JVM about the task that should be performed by it, if any object implements my marker interface?
15 years ago