Skip to content

Instantly share code, notes, and snippets.

@thinkphp
Created April 4, 2025 14:36
Show Gist options
  • Save thinkphp/ba03fc2d8223a2d210c5667a59ed95fa to your computer and use it in GitHub Desktop.
Save thinkphp/ba03fc2d8223a2d210c5667a59ed95fa to your computer and use it in GitHub Desktop.
Main.java
package mp3player;
public class Main {
public static void main(String[] args) {
// Testăm clasa AudioFile cu diferite căi de fișiere
AudioFile file1 = new AudioFile("C:\\Music\\Queen - Bohemian Rhapsody.mp3");
System.out.println("Pathname: " + file1.getPathname());
System.out.println("Filename: " + file1.getFilename());
System.out.println("Author: " + file1.getAuthor());
System.out.println("Title: " + file1.getTitle());
System.out.println("Formatted: " + file1);
System.out.println("----------------------");
AudioFile file2 = new AudioFile("/home/user/Music/Eminem - Lose Yourself.mp3");
System.out.println("Pathname: " + file2.getPathname());
System.out.println("Filename: " + file2.getFilename());
System.out.println("Author: " + file2.getAuthor());
System.out.println("Title: " + file2.getTitle());
System.out.println("Formatted: " + file2);
System.out.println("----------------------");
AudioFile file3 = new AudioFile("Metallica - Nothing Else Matters.mp3");
System.out.println("Pathname: " + file3.getPathname());
System.out.println("Filename: " + file3.getFilename());
System.out.println("Author: " + file3.getAuthor());
System.out.println("Title: " + file3.getTitle());
System.out.println("Formatted: " + file3);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment