Jiakuang He

How To Change The Default File Called Main On Replit

image-20230320162930611

image-20230320163118416

vi .replit

image-20230320163153292

Press down enter to use the default editor.

Way1: Steps to edit the default file called main

1. `i`

image-20230320163339180

2. Edit the file name

image-20230320163440995

  1. go to the normal mode, press down the esc

  2. Write and quit the file :wq

  3. press enter key again

    image-20230320163636297

Way2: Run the file with the Python command

python student.py

student.py is related to the file you just rename it

How to change Java default file name

Method 1: change the default configuration

image-20230403162334234

image-20230403162400403

Method 2: compile and run by using the command

javac Animal.java
java Animal

How Java Cross Platform

Untitled Diagram.drawio (2)

How to change C++ default file name

Don’t need to change the configuration.

image-20230403161639485

If we have two files, and both have main method, we will get the compile errors.

image-20230403161815753