Code examples for String

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
30:	String packageName = filePath.replaceAll("\\\\|-|\\.|/", "_"); 
31:	clazz = Class.forName(packageName + "." + getPackageClassName(packageName)); 
-
42:	return Character.toUpperCase(packageName.charAt(0)) + packageName.substring(1, packageName.length()) + "Package"; 
Full Snippet Info
7
CodeRank
38:	String propVal=new String("both"); 
-
48:	if (propVal.equals("treeonly") | propVal.equals("both")) { 
-
51:	if (propVal.equals("tableonly") | propVal.equals("both")) { 
Full Snippet Info
7
CodeRank
34:	static public String fieldStaticString = new String("helloworld"); 
Full Snippet Info
6
CodeRank
108:	if (engine.equals(INTERNET_EXPLORER)) 
-
111:	if (engine.equals(OPERA)) 
-
114:	if (engine.equals(FIREFOX)) 
-
117:	if (engine.equals(CHROME)) 
-
120:	if (engine.equals(SAFARI)) 
Full Snippet Info
6
CodeRank
41:	if (propValue.equals("treeonly") | propValue.equals("tableonly") | propValue.equals("both") | propValue.equals("none")) { 
-
48:	if (propVal.equals("treeonly") | propVal.equals("both")) { 
-
51:	if (propVal.equals("tableonly") | propVal.equals("both")) { 
Full Snippet Info
6
CodeRank
79:	switch (method.charAt(5)) { 
-
81:	if (method.equals("_get_EJBHome")) { 
-
85:	if (method.equals("remove")) { 
-
89:	if (method.equals("_get_handle")) { 
-
93:	if (method.equals("isIdentical")) { 
-
97:	if (method.equals("_get_primaryKey")) { 
Full Snippet Info
6
CodeRank
83:	switch (method.length()) { 
-
85:	if (method.equals("create")) { 
-
89:	if (method.equals("_get_homeHandle")) { 
-
93:	if (method.equals("_get_EJBMetaData")) { 
-
97:	if (method.equals("remove__java_lang_Object")) { 
-
99:	} else if (method.equals("remove__javax_ejb_Handle")) { 
Full Snippet Info
6
CodeRank
113:	Edit ed = new Edit(1, length (), DNATools.createDNA(new String(seqString))); 
Full Snippet Info
6
CodeRank
188:	int domainNameSeparatorIndex = username.indexOf(DOMAIN_NAME_SEPARATOR); 
-
190:	String domainName = username.substring(domainNameSeparatorIndex + 1); 
191:	tenantID = realmService.getTenantManager().getTenantId(domainName); 
Full Snippet Info
6
CodeRank
190:	if (cmd.equalsIgnoreCase("Forums")) { 
-
193:	if (cmd.equalsIgnoreCase("Vote")) { 
-
196:	if (cmd.equalsIgnoreCase("Donate")) { 
-
199:	if (cmd.equalsIgnoreCase("Exit")) { 
-
205:	if (cmd.equalsIgnoreCase("Item List")){ 
Full Snippet Info
6
CodeRank
156:	return cassandraAdminStub.getColumnFamilyOfCurrentUser(keyspaceName, cfName); 
-
421:	if (columnFamilyName == null || "".equals(columnFamilyName.trim())) { 
Full Snippet Info
5
CodeRank
59:	if(!"".equals(host) && !"".equals(port)) 
-
61:	hostList=host + ":" + port; 
-
63:	else if("".equals(host) && "".equals(port)) 
-
69:	if("".equals(host)) 
Full Snippet Info
5
CodeRank
23:	if ( attr_name.equals ( "id" ) ) { 
-
27:	else if ( attr_name.equals ( "mirrorpath" ) ) { 
-
31:	else if ( attr_name.equals ( "typemask" ) ) { 
Full Snippet Info
5
CodeRank
57:	return ISOUtil.hex2byte(hexString.replaceAll(" ", "")); 
Full Snippet Info
5
CodeRank
39:	String filePath = className.substring(0,className.indexOf(WEBINF) + WEBINF.length()); 
-
49:	xml = filePath + "/repository_db.xml"; 
-
51:	xml = filePath + "/repository.xml"; 
Full Snippet Info
5
CodeRank
31:	int dotPos = s.lastIndexOf("."); 
-
34:	String result = s.substring(0, dotPos+1); 
35:	result = result + ext; 
-
41:	result = result + "." +ext; 
Full Snippet Info
5
CodeRank
19:	if(str.length() == 1) 
-
21:	else if(str.length() > 1 && i < str.length()) 
-
23:	s = RevStr(str, i+1) + str.charAt(i); 
Full Snippet Info
5
CodeRank
219:	return getTypeName(typeElementRequiringScanning.getEnclosingElement()) + "$" + typeElementRequiringScanning.getSimpleName().toString(); 
Full Snippet Info
5
CodeRank
12:	int len = str.length(); 
-
14:	str.getChars(0, len, data, 0); 
-
19:	return stringWidth(new java.lang.String(data, off, len)); 
Full Snippet Info
5
CodeRank
61:	stmt.setString(1, userId + "_token"); 
-
65:	stmt.setString(5, userId); 
Full Snippet Info
5
CodeRank