This is program that return a concatenated string to the main()
import java.io.*;
class ConCat {
public static void main(String args[]) {
String a, b ,c;
a = "Animesh ";
b = "Pandey";
c = concat(a, b);
System.out.println(c);
}
}
static String concat(String s1, String s2) {
String C;
C = s1 + s2;
return C;
}
List of errors !!!
F:\java\example>javac ConCat.java
ConCat.java:1: class, interface, or enum expected
{\rtf1\ansi\ansicpg1252\deff0\deflang16393{\fonttbl{\f0\fmodern\fprq1\fcharset0
Courier New;}}
^
ConCat.java:1: illegal character: \92
{\rtf1\ansi\ansicpg1252\deff0\deflang16393{\fonttbl{\f0\fmodern\fprq1\fcharset0
Courier New;}}
^
ConCat.java:1: illegal character: \92
{\rtf1\ansi\ansicpg1252\deff0\deflang16393{\fonttbl{\f0\fmodern\fprq1\fcharset0
Courier New;}}
^
ConCat.java:1: illegal character: \92
{\rtf1\ansi\ansicpg1252\deff0\deflang16393{\fonttbl{\f0\fmodern\fprq1\fcharset0
Courier New;}}
^
ConCat.java:1: illegal character: \92
{\rtf1\ansi\ansicpg1252\deff0\deflang16393{\fonttbl{\f0\fmodern\fprq1\fcharset0
Courier New;}}
^
ConCat.java:1: illegal character: \92
{\rtf1\ansi\ansicpg1252\deff0\deflang16393{\fonttbl{\f0\fmodern\fprq1\fcharset0
Courier New;}}
^
ConCat.java:1: illegal character: \92
{\rtf1\ansi\ansicpg1252\deff0\deflang16393{\fonttbl{\f0\fmodern\fprq1\fcharset0
Courier New;}}
^
ConCat.java:1: illegal character: \92
{\rtf1\ansi\ansicpg1252\deff0\deflang16393{\fonttbl{\f0\fmodern\fprq1\fcharset0
Courier New;}}
^
ConCat.java:1: illegal character: \92
{\rtf1\ansi\ansicpg1252\deff0\deflang16393{\fonttbl{\f0\fmodern\fprq1\fcharset0
Courier New;}}
^
ConCat.java:1: illegal character: \92
{\rtf1\ansi\ansicpg1252\deff0\deflang16393{\fonttbl{\f0\fmodern\fprq1\fcharset0
Courier New;}}
^
ConCat.java:1: illegal character: \92
{\rtf1\ansi\ansicpg1252\deff0\deflang16393{\fonttbl{\f0\fmodern\fprq1\fcharset0
Courier New;}}
^
ConCat.java:1: class, interface, or enum expected
{\rtf1\ansi\ansicpg1252\deff0\deflang16393{\fonttbl{\f0\fmodern\fprq1\fcharset0
Courier New;}}
^
ConCat.java:2: illegal character: \92
{\*\generator Msftedit 5.41.21.2506;}\viewkind4\uc1\pard\f0\fs24 import java.io.
*;\par
^
ConCat.java:2: illegal character: \92
{\*\generator Msftedit 5.41.21.2506;}\viewkind4\uc1\pard\f0\fs24 import java.io.
*;\par
^
ConCat.java:2: class, interface, or enum expected
{\*\generator Msftedit 5.41.21.2506;}\viewkind4\uc1\pard\f0\fs24 import java.io.
*;\par
^
ConCat.java:2: illegal character: \92
{\*\generator Msftedit 5.41.21.2506;}\viewkind4\uc1\pard\f0\fs24 import java.io.
*;\par
^
.......
Please help me remove them, file name is ConCat.java.