Question Index

Write a program to convert given Pig Latin sentence to English sentence. To convert a word from Pig Latin to English remove the last two characters, after this move the current last character to the front and make every thing to lower case.

Input (String) Output (String)
Ouybf Reabf Abf Eryvbf Pecialsbf Indkbf Fobf Tupidsbf you are a very special kind of stupid
Ibf Mabf Otnbf Abf Ooserlbf Ybbf Aturenbf Tsibf Ustjbf Abf Ornbbf Alenttbf i am not a looser by nature its just a born talent
Rokenbay Encilspay Reaay Ointlesspay broken pencils are pointless
Oncz Hescz Sicz Otncz Ymcz Irlfriendgcz Hescz Sicz Ntelligenticz no she is not my girlfriend she is intelligent

class ConvertPigLatinToEnglish

{    public static void main(String s[])
        String inputSentence = "Ouybf Reabf Otnbf Abf Ompletecbf Diotibf Tillsbf Omesbf Artspbf Reabf Issingmbf";
        System.out.println("The equivalent English sentence is : " + convertToEnglish(inputSentence));


public static String convertToEnglish(String input) {
//Write code here to convert given Pig Latin sentence to English sentence.



Topic: Additional String Methods in Java

Read this topic
Take test on this topic

Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App