How to Rename file


when there are multiple classes in JAVA program, the file gets name same as that of topmost class automatically, but we require to give file name same as that of class name which contain PSVM..... So please suggest me how to Rename the file

2 Answers

4 years ago by

@Atul In OneCompiler to avoid errors by users, Onecompiler automatically gets the name from First class. We currently do not support renaming feature in the Editor.
However we are working on version 2 of the editor where we are going to support multiple files in the editor, in that we are also going to support the renaming of the files.

4 years ago by Karthik Divi

#include <iostream>
using namespace std;

int main() {

string a, b, c;

cout << "variabel a = ";
cin >> a;
cout << a << endl;
cout << "variabel b = ";
cin >> b;
cout << b << endl;

c = a;
a = b;
b = c;

cout << "variabel a = " << a << endl;
cout << "variabel b = " << b << endl;

return 0;
}

1 year ago by Jovian Anggono