lets say we have a string
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.
Jump to Post
what 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
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.