Java Programming and Technical Programming Arrays

Write a function that accepts a sentence as a parameter, and returns the same with each of its words reversed. The returned sentence should have 1 blank space between each pair of words.

Demonstrate the usage of this function from a main program.

Example:
Parameter: “jack and jill went up a hill”
Return Value: “kcaj dna llij tnew pu a llih”

Read Solution (Total 10)

Java Other Question

import java.io.BufferedReader;
//import java.io.FileNotFoundException;
import java.io.FileReader;


public class Calculatefrompara {

private static BufferedReader bin;
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub


FileReader fin=new FileReader("test.txt");
bin = new BufferedReader(fin);

int Alphabets=0,digits=0,splchars=0,lowercase=0,uppercase=0;
String line=bin.readLine();

int i;
//char c1;
while(line!=null)
{
for( i=0;i=97 && j<=122)|| (j>=65 && j<=90))
{
Alphabets++;
}
else
if(j>=97 && j<=122)
{
lowercase++;
}

else
if(j>=65 && j<=90)
{
uppercase++;
}
else
if(j>=48 && j<=57)
{
digits++;
}
else
{
splchars++;
}


}
line=bin.readLine();


}

System.out.println("alphabets:"+Alphabets);
System.out.println("lowercase:"+lowercase);
System.out.println("uppercase:"+uppercase);
System.out.println("digits:"+digits);
System.out.println("splchrs:"+splchars);

}

}
Have You Seen A "Tree"??
a)Yes b)No
The above question is related to class and Object....If you say Yes/No....please Submit your reason also