Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completed challenge no. 1 #219

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions submissions/smolsuryansh/MySolution.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import java.io.FileReader;
import java.io.BufferedReader;
import java.io.IOException;

public class MySolution{
public static void main(String[] args) {
String filecsv = "spotifycsvfile.csv";
String line;
int songs = -1;
try(BufferedReader br = new BufferedReader(new FileReader(filecsv))){
while((line = br.readLine()) != null){
songs+=1;
}
System.out.println("Total number of songs are: " + songs);
}
catch(Exception e){
System.out.println(e);
}
}
}
3 changes: 3 additions & 0 deletions submissions/smolsuryansh/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To run the the file:
- Locate to file-io\submissions\smolsuryansh
- Then type in java MySolution.java in the terminal
Loading