Results 1 to 4 of 4

Thread: Built in functions in java

  1. #1
    Join Date
    Dec 2010
    Posts
    53

    Built in functions in java

    Hello all my developer friends , it gives me a great pleasure to write in this forum , I am write now developing an application , I am using the Sun's Java language . I decided to use this object oriented approach because I am not that much aware of the C language and but I had used Netbeans to development the application , but I now wish to include the built i function of Java in my project. Please guide me on this topic.

  2. #2
    Join Date
    May 2009
    Posts
    511

    Re: Built in functions in java

    Code:
    import java.io.*;
    
    public class ConcatString{
      public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Input First String:");
        String s1 = br.readLine();
        System.out.println("input Second String:");
        String s2 = br.readLine();
        System.out.println("The two string combined in one");
        String c = s1.concat(s2);
        System.out.println("Combined string: " + c);

    Here is the example of the coded being used to concatenate two strings into one , in this code we have used the inbuilt method called as concat method . Similarly we can use some other functions called as String functions.

  3. #3
    Join Date
    Apr 2009
    Posts
    569

    Re: Built in functions in java

    Built in functions are the functions are those functions that are already been defined being in the Java library. These functions can be called directly , these are actually classes in the java of which you can declare a keyword and then can be instantiated and can be called directly using that object without defining it. there are a lot of such functions , one of which was shown in the above post as a Concatenating method , similarly there are a lot of function that can be used to do mathematics operations called as math functions.

  4. #4
    Join Date
    May 2009
    Posts
    527

    Re: Built in functions in java

    The Array object has three functions:
    j
    • join: Joins all items of an array into a string.
    • reverse: Reverses items of an array
    • sort: Sorts items of an array on the basis of a particular comparison methods .

    join method Returns a string including all the items of the array.
    Syntax:
    Code:
    arrayName.join(separator)
    where arrayName is the name of an object being created in the Array.
    separator refers to a string to split each item of the array. The separator is converted to a string if required. If neglected, a comma (,) is used by default.
    The reverse method Reverses the items of an array: the initial array item becomes the final and the last becomes the initial. Returns ? The consequence of this function is to alter the calling object.
    Syntax:
    Code:
    arrayName.reverse()

Similar Threads

  1. Need SQL plus commands and functions
    By Barsha in forum Software Development
    Replies: 4
    Last Post: 25-02-2010, 06:19 AM
  2. Types of Functions in SQL
    By Prashobh Mallu in forum Software Development
    Replies: 4
    Last Post: 10-02-2010, 11:43 AM
  3. What are the different built-in Exceptions available in java?
    By ScarFace 01 in forum Software Development
    Replies: 5
    Last Post: 22-01-2010, 09:06 AM
  4. trim functions of VB
    By Ram Bharose in forum Software Development
    Replies: 5
    Last Post: 31-12-2009, 11:51 AM
  5. Functions in PHP
    By Gyan Guru in forum Guides & Tutorials
    Replies: 3
    Last Post: 13-12-2008, 06:20 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,639,372.14904 seconds with 17 queries