#Java VS CODE HELP NEEDED assignment due in 3 hours:(

59 messages · Page 1 of 1 (latest)

peak ocean
#

IM UNABLE TO RUN THE CODE IN VS CODE, IT KEEPS SAYING :
Error: Could not find or load main class OOPSBannerApp
Caused by: java.lang.ClassNotFoundException: OOPSBannerApp

THIS IS WHAT I HAVE TO DO AS GIVEN IN PDF:
"Please write the full code for OOPSBannerApp.java that does the following:
Defines a String 1D array with a size of 7 to hold the banner lines.
Populates each index of the array using the String.join() method to construct the character patterns for 'OOPS'.
Uses an enhanced for-loop (for-each) to iterate through the array and print each line sequentially.
Ensure the visual output matches the 7-line format with 9-character width per character.
+4"

boreal cairnBOT
#

This post has been reserved for your question.

Hey @peak ocean! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 720 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

haughty moon
#

How do you run the application? Which files are present?

peak ocean
#

i ran it using the debug and run command

haughty moon
#

What is the content of the file?

#

For public classes, the class name must match the file name (but without the .java)

peak ocean
haughty moon
#

Did you not open a folder in VSC?

peak ocean
#

How do I do that?

#

🥲

haughty moon
#

ok

#

so normally, you have a Java project with your files in them

#

I think if you click on the file selection thing in VSC, you can create a Java project there

peak ocean
#

i had clicked on new file

#

and it showed the search bar terminal
so then i chose java
it opened the file explorer to save file
then named it as OOPSBannerApp

#

is this what youre talking about?

haughty moon
#

no

#

There should be an option to create a Java project

#

I think

#

I don't use VSC

peak ocean
#

ohh

haughty moon
#

I think you can press Ctrl+P and type >Java Project to get a Create Java Project option

peak ocean
#

and this is what i got

peak ocean
haughty moon
#

both are "New Project" and "Create Java Project" should be fine

haughty moon
peak ocean
#

can i share my screen or something😭

haughty moon
#

I don't really want to get in a voice chat

peak ocean
#

okay alrightt

#

this is what im getting

haughty moon
#

You can create the Java file in the src folder

peak ocean
#

It shows this

haughty moon
#

You can add the existing file next to it and probably also delete App.java

peak ocean
#

existing file? the one i had created before?

#

or shld i jst paste the code onto the App.java part?

#

will it work the same?

haughty moon
#

yes

haughty moon
peak ocean
peak ocean
#

is this it?

honest turtle
#

if yes then looks ok

peak ocean
#

but that's shown in the terminal part

#

for output it shows this

#

is it okay?

haughty moon
#

yes

peak ocean
boreal cairnBOT
# peak ocean okay thank you so much

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.