Chemistry, asked by adityapandey150, 1 year ago

write a program in Java to take input name of the person and print the surname first and then name

Answers

Answered by ashwika
1
may be
<html><body>class Surname{ void input(String s) {   int len=s.length();   int in=0;   char a;   int last= s.lastIndexOf(‘  ‘);   int first=s.indexOf(‘  ‘);   String sur=s.substring(last+1);  }}</body></html>
Similar questions