java pig latin

java pig latin

how do you add the first letter of a word to the end of the word

View Answers

November 19, 2010 at 11:42 AM

Hi Friend,

If you want to remove the first letter of your word and add it at the end of the same word,try the following code:

import java.util.*;

class Word{
    public static void main(String[] args){
        Scanner input=new Scanner(System.in);
        System.out.println("Enter Word: ");
        String word = input.next();
        char ch=word.charAt(0);
        String st=word.replace(Character.toString(ch),"");
        String newWord=st+Character.toString(ch);
        System.out.println(newWord);
    }
}

And if you simply want to add the first letter of word to the end of same word without removing the letter, then try the following:

import java.util.*;

class Word{
    public static void main(String[] args){
        Scanner input=new Scanner(System.in);
        System.out.println("Enter Word: ");
        String word = input.next();
        char ch=word.charAt(0);
        String newWord=word+Character.toString(ch);
        System.out.println(newWord);
    }
}

Thanks









Related Tutorials/Questions & Answers:
java pig latin
java pig latin  how do you add the first letter of a word to the end of the word   Hi Friend, If you want to remove the first letter of your word and add it at the end of the same word,try the following code:ADS
ModuleNotFoundError: No module named 'pig-latin'
ModuleNotFoundError: No module named 'pig-latin'  Hi, My Python... 'pig-latin' How to remove the ModuleNotFoundError: No module named 'pig... have to install padas library. You can install pig-latin python with following
Advertisements
ModuleNotFoundError: No module named 'Pig_Latin_Translator'
ModuleNotFoundError: No module named 'Pig_Latin_Translator'  Hi...: No module named 'Pig_Latin_Translator' How to remove the ModuleNotFoundError: No module named 'Pig_Latin_Translator' error? Thanks   Hi
Big Data Pig - Apache Pig
Ecoystem and it provides Pig Latin a textual language for running query against Hadoop...Big Data Pig - Apache Pig  Hi, What is Ping in Big Data? I have heard about Apache Pig. What is Apache Pig? Thanks   Hi, Both
ModuleNotFoundError: No module named 'pig'
ModuleNotFoundError: No module named 'pig'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'pig' How to remove the ModuleNotFoundError: No module named 'pig' error
ModuleNotFoundError: No module named 'pig-py'
ModuleNotFoundError: No module named 'pig-py'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'pig-py' How to remove the ModuleNotFoundError: No module named 'pig-py'
Version of com.intentmedia>pig-annotations dependency
List of Version of com.intentmedia>pig-annotations dependency
ModuleNotFoundError: No module named 'archives_org_latin_toolkit'
ModuleNotFoundError: No module named 'archives_org_latin_toolkit'  Hi...: No module named 'archives_org_latin_toolkit' How to remove the ModuleNotFoundError: No module named 'archives_org_latin_toolkit' error? Thanks
ModuleNotFoundError: No module named 'archives_org_latin_toolkit'
ModuleNotFoundError: No module named 'archives_org_latin_toolkit'  Hi...: No module named 'archives_org_latin_toolkit' How to remove the ModuleNotFoundError: No module named 'archives_org_latin_toolkit' error? Thanks
ModuleNotFoundError: No module named 'python-latin-expr-fr'
ModuleNotFoundError: No module named 'python-latin-expr-fr'  Hi...: No module named 'python-latin-expr-fr' How to remove the ModuleNotFoundError: No module named 'python-latin-expr-fr' error? Thanks   Hi
ModuleNotFoundError: No module named 'unicode-slugify-latin'
ModuleNotFoundError: No module named 'unicode-slugify-latin'  Hi...: No module named 'unicode-slugify-latin' How to remove the ModuleNotFoundError: No module named 'unicode-slugify-latin' error? Thanks   Hi
ModuleNotFoundError: No module named 'archives_org_latin_toolkit'
ModuleNotFoundError: No module named 'archives_org_latin_toolkit'  Hi...: No module named 'archives_org_latin_toolkit' How to remove the ModuleNotFoundError: No module named 'archives_org_latin_toolkit' error? Thanks
ModuleNotFoundError: No module named 'pyci-guinea-pig'
ModuleNotFoundError: No module named 'pyci-guinea-pig'  Hi, My... named 'pyci-guinea-pig' How to remove the ModuleNotFoundError: No module named 'pyci-guinea-pig' error? Thanks   Hi, In your python
Maven Dependency pig-annotations >> 0.0.2
You should include the dependency code given in this page to add Maven Dependency of com.intentmedia >> pig-annotations version0.0.2 in your project
Java Word Processor
reads the same forwards as backwards) ? return a Pig Latin version of the text... this method do its work. To convert a word to Pig Latin: o if the word begins... not be included in the middle of a Pig Latin version of a word but should
what is a indentifier - Java Beginners
) returns true. The Java letters include uppercase and lowercase ASCII Latin letters... is the definition?  An identifier is an unlimited-length sequence of Java letters and Java digits, the first of which must be a Java letter. An identifier cannot
Hadoop for Business Analysts
as compared to Java programming code. So, Business Analysts should learn Pig Latin... in Hadoop Ecosystem which is used to easily write MapReduce query in Pig Latin language. Script written in Pig Latin is transformed into MapReduce job
Hadoop for Business Analysts
as compared to Java programming code. So, Business Analysts should learn Pig Latin... in Hadoop Ecosystem which is used to easily write MapReduce query in Pig Latin language. Script written in Pig Latin is transformed into MapReduce job
Hadoop for Business Analysts
Ecosystem which is used to easily write MapReduce query in Pig Latin language. Script written in Pig Latin is transformed into MapReduce job and executed... programming code. So, Business Analysts should learn Pig Latin language and gain
Which programming language should I learn after Java
learning Java and core java is going to complete in next 10 days. After core java I... language should I learn after Java? Thanks   Hi, Java is very popular programming language for enterprise application development. Core Java
Which programming language should I learn after Java
learning Java and core java is going to complete in next 10 days. After core java I... language should I learn after Java? Thanks   Hi, Java is very popular programming language for enterprise application development. Core Java
Which programming language should I learn after Java
learning Java and core java is going to complete in next 10 days. After core java I... language should I learn after Java? Thanks   Hi, Java is very popular programming language for enterprise application development. Core Java
Which programming language should I learn after Java
learning Java and core java is going to complete in next 10 days. After core java I... language should I learn after Java? Thanks   Hi, Java is very popular programming language for enterprise application development. Core Java
Technologies to learn for Big Data
Pig is a tool which allows the developers to write MapReduce Jobs is Pig Latin... to write MapReduce jobs the Pig Latin scripting was developed. The Pig Latin script... system. You can check our tutorial at The Beginners Linux Guide. 2. Java
Simple ATM Java Code...
Simple ATM Java Code...  You are required to write a Graphical User Interface that simulates an ATM by building on the program you wrote... 1004.04 Porky Pig 5678 1005.05 (you may rearrange the data
Java program - Java Beginners
Java program  Dear maam/Sir, I am a 2nd year Computer... not that familiar with java environment.. My friend told me that you can help me with my...{ if ((x == 2) || (x == -10)){ chineseSign="Pig
Technologies to learn for Big Data
the developers to write MapReduce Jobs is Pig Latin scripting language which... and also takes time. To, enable non-programmers to write MapReduce jobs the Pig Latin scripting was developed. The Pig Latin script is executed with the help
Big Data Training 2019 - Which are the best big data online training institutes in India?
as Map-Reduce program. The Pig Latin language is used to write Map-Reduce job... growing field:ADS_TO_REPLACE_1 Learning Basics programming Java or Python..._TO_REPLACE_2 Check Big Data and Hadoop online training for Java Programmer course
Big Data and Hadoop Training - Online and classroom
Big Data and Hadoop online training for Java Programmer Yes, you... possible time. We at Rose India provides online training to experienced Java... Data, Hadoop, HDFS, MapReduce, Hbase, Hive, Pig, Yarn, Oozie, Flume and Sqoop
Reading ISO Latin-1 Encoded Data in Java
Reading ISO Latin-1 Encoded Data in Java   ... as "Latin alphabet No. 1".  Here, you will see how to use the ISO... C:\nisha>java ReadEncodedLatin Enter File name
About zodiac sign in java - Java Beginners
,, your chinese zodiac sign (year, ex: rat, pig, dragon etc..) and the element... == 2) || (x == -10)){ chineseSign="Pig
java
java  diff bt core java and java
java
java  what is java
JAVA
JAVA  how the name came for java language as "JAVA
java
java   why iterator in java if we for loop
Java
Java   Whether Java is pure object oriented Language
java
java  explain technologies are used in java now days and structure java
java
java  different between java & core java
java
java  is java open source
java
java  what is java reflection
java
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
java
what is the size of array in java ?  what is the size of array in java ? what is the mean of finalize in java
Which is the best institute on Hadoop training in India?
Which is the best institute on Hadoop training in India?  Hi, I am working in PHP and Java technologies. Mainly developing web application for my... including HDFS, Hive, Pig etc.. Which is the best institute on Hadoop training
Which is the best institute on Hadoop training in India?
Which is the best institute on Hadoop training in India?  Hi, I am working in PHP and Java technologies. Mainly developing web application for my... including HDFS, Hive, Pig etc.. Which is the best institute on Hadoop training
java
java  give a simple example for inheritance in java
java
java  give a simple example for inheritance in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  why to set classpath in java

Ads