lets say we have a string
String ss="file1";
now i want to create a variable (a file variable) and i want its name to be file1 which is the content of the string ss.
johny08z378
0
Newbie Poster
Recommended Answers
Jump to Postwhat do you mean by a variable? your String itself is a variable.
if you want to create a File object named after that String:String ss = "file1"; File myFile = new File(ss);
slight remark: the above will just create a File variable, not an actual …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.