deepak singh

Greenhorn
+ Follow
since Sep 03, 2001
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 deepak singh

hi Bosun Bello,
i know that i will get by that ,as i have writen this program
"
import java.util.*;
public class capitalizingString
{
public static String capatilize(String str)
{
StringTokenizer st=new StringTokenizer(str,"");
StringBuffer sb=new StringBuffer();
if(st.hasMoreElements())
{
String e1= (String)st.nextElement();
if(int i=0;i<st.countTokens();i++)>
{
sb.append(Character.toUpperCase(e1.charAt(i)));
sb.append(e1.substring(1)+ "");
}
}
return sb.toString();
}
public static void main(String arg[])
{
String s="this is the sentance which u have to do capitalize";
String s1=capatilize(s);
System.out.println("result of capitalizing;"+s1);
}
}
"
after running this i am geting only frist letter capital
outPut is
"This is the sentance which u have to do capitalize"
but i what out put
"This Is The Sentance Which U Have To Do Capitalize"
20 years ago

can any one write a small program to print capital letter of each word.
for example="this sentance i have to put in capital";
out put i want is
"This Sentance I Have To Put In Capital"
20 years ago
hi,
when to use get or setAttribute
and when to use get or setParameter
pls help me out
deepak
20 years ago
hi ,
i am making an portal in servlet i am using global variable,like for example
-----------------------------------------------------
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import java.lang.*;
import javax.naming.*;
import java.sql.*;
import java.net.*;
import cpool.*;
public class AdminSearch extends HttpServlet {
String login;
String password;
String userType;

String firstName;
String lastName;
String address;
String city;
String state;
String zip;
String country;
String email;
String phone;
String specialty;
String status;
String sort;
String num;
boolean notFound= true ;
private Connection conn=null;
public void setConnection(Connection conn)
{
this.conn=conn;
}
public Connection getConnection()
{
return this.conn;
}

/** Initializes the servlet.
*/
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
/** Destroys the servlet.
*/
public void destroy() {
}

/** Handles the HTTP <code>GET</code> method.
* @param request servlet request
* @param response servlet response
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException {
doPost(request,response);
}

/** Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
*/

protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException {
---
--
codind
---
--
}
-------------------------------------------------------
will this affect any way to site .
thanx
deepak
20 years ago