Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!

Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > Java

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 05-29-2018, 07:05 AM   #1
ajaxdns
Registered User
 
Join Date: Apr 2018
Posts: 413
Is Empty .java file name a valid source file name?

Yes, save your java file by .java only, compile it by javac .java and run by java yourclassname Let's take a simple example:

//save by .java only
class A{
public static void main(String args[]){
System.out.println("Hello java");
}
}
//compile by javac .java
//run by java A
compile it by javac .java

run it by java A
ajaxdns is offline   Reply With Quote

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Empty .java file name a valid source file name? sunled Java 0 05-22-2018 11:58 PM
Is Empty .java file name a valid source file name? ajaxdns Java 0 04-22-2018 10:30 AM
Is Empty .java file name a valid source file name? sunled Java 0 04-12-2018 09:42 PM
Is Empty .java file name a valid source file name? tmpooja Java 0 04-04-2018 04:09 AM
Is Empty .java file name a valid source file name? sunled Java 0 11-16-2017 01:25 AM


All times are GMT -7. The time now is 02:08 AM.


Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.