Tag Archives: Main String

Get characters in a string – C Sharp/C#

By | April 7, 2012

Hi, Sometimes you may need to get all the characters in a string using C Sharp/C#. The following code gives you an example of how to get or display all the characters of a given string. Output: sampleString[0] = I sampleString[1] = sampleString[2] = L sampleString[3] = o sampleString[4] = v sampleString[5] = e sampleString[6]โ€ฆ Read More »

Java check memory Allocation

By | April 7, 2012

When run the code the output will be similar to this Total memory is: 5177344 Initial free memory: 4986744 Free memory after garbage collection: 5063784 Free memory after allocation: 5045296 Memory used by allocation: 18488 Free memory after collecting discarded Integers: 5063784

Single Selection ListView in android

By | January 8, 2012

Hello all….. In today’s post I will show you how to create a single selection list in android. Here is the main.xml Now this line in the java file creates the single choice. setListAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_single_choice, android.R.id.text1, names)); Now this is the full java code

Sort elements in a String Array – C Sharp / C#

By | June 21, 2011

Hi, In order to sort the elements in a string array in C Sharp/C#, we use the sort() method. Given below is a simple example using sort() method to sort the elements in a string array. It will print out, Sorted string Array: urStringArray[0] = apple urStringArray[1] = coderz urStringArray[2] = heaven123 urStringArray[3] = heaven777โ€ฆ Read More »

How to split a String in ANDROID?

By | May 5, 2011

Hi all….. Splitting a string in android is really easy.checkout the following snippet. Check the Logcat for output. Note: Make sure to put the escape character before the delimiter for splitting,otherwise the output may be each character.

C Sharp/C# – String Uppercase/Lowercase Conversion

By | April 28, 2011

Hi, It will be very useful to know how you can convert a given string into uppercase or lowercase using program. We are going to show you , how to convert a given string into uppercase or lowercase using C Sharp/C#. See the example given below. Output : Lowercase of sampleString : coderzheaven Uppercase ofโ€ฆ Read More »