السلام عليكم جميعا
بداية أحب أشكركم ع جهودكم المبذولة
وأود أن أخبركم اني طالب مبتدأ في دروس الجافا
واستعصى علي كتابة كود :blush:
أتمنى منكم توضيح الاخطاء لي
ومساعدتي في اتمامه وشرح الطريقة لي
. Write a program that reads a string then replaces every occurrence
of the middle character with the next character in Unicode sequence.
Then print the resulting string.
public class ReplaceProgram
{
public static void main(String[] args)
Scanner console = new Scanner (System.in);
{
string s1;
s1= "abc";
System.out.println("Enter a string ")
char 'a','b','c';
System.out.println( s1.replace(‘b’ ,’c’);
System.out.println( s1.replace('b' ,'c');
}
}
import java.util.*;
وأشكركم مقدما