venkat prathap

Greenhorn
+ Follow
since Jun 06, 2011
venkat likes ...
Eclipse IDE Notepad Java
Merit badge: grant badges
For More
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by venkat prathap


i would suggest stored procedure, i think ..... using procedure it will be solved easily
12 years ago
while selecting Vector or Arraylist, it depends on 2 factors...whether our collection should be threadsafe/fast access ie performance.

if we go with threadsafe, it is better to go with Vector, Vector is synchronized ie all methods in the vector are synchronized.so when synchronized only one thread can access the list.

In case of Arraylist, this is not threadsafe ie not synchronized...so when it is not synchronized there is no limit in case of threads also.


In general..if we just accessing(read) the list , it would be suggestable to go with arraylist.in case of add/update of list its better to go with vector, it provides thread safe..


Thanks,
Venkat.
12 years ago
Hi,

try the below code..hope it might help you.


static List<String> list = new ArrayList<String>();

public static void addElement(String str) {



String elements[] = new String[list.size()];
elements = list.toArray(elements);

int tempi = 0;
for (int i = 0; i < elements.length; i++) {
if (elements[i].startsWith(str)) {
tempi++;
}
}

if (tempi > 0) {
list.add(str + tempi);
}
else
list.add(str);

System.out.println(list);

}

Thanks,
Venkat.




12 years ago
<% if (true) {%>

<html>
Hello America and Existing html above
</html>

<%
} else {%>

<entire Existing html>

<% } %>

12 years ago
JSP
Hi,

give the below trial

if Dtype is not Integer object, use give the below trial.

Integer tempObj = new Integer(Integer.parseInt(Dtype));
chkList.contains(tempObj)


when Dtype is Integer , go with below code.
chkList.contains(Dtype)


Thanks,
MVVPR




12 years ago
i would suggest change the query to

ResultSet results = stmt.executeQuery("select * from " + tableName +" where username ='"+login+"'");

hope...It might help you..
Hey,

Can you share me exception log you are getting...
12 years ago