Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a file in java without a extension

Tags:

java

file

io

Is it possible in java to create a file without extension

like image 448
Suresh S Avatar asked Mar 22 '26 04:03

Suresh S


1 Answers

You can try

File f;
f=new File("myfile");
if(!f.exists()){
  f.createNewFile();
}
like image 176
Adriaan Stander Avatar answered Mar 24 '26 18:03

Adriaan Stander



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!