#Confused with the syntax

1 messages ยท Page 1 of 1 (latest)

limber rapidsBOT
#

<@&987246399047479336> please have a look, thanks.

limber rapidsBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

spring hedge
#

i dont quite follow what ur question is tbh

#

ur saying ur confused about extends?

#

but ur code doesnt have any extends in it

oak pilot
#

Yes it's similar to js extends

brazen bridge
#

what is going on under the hood

public Product product syntax in inventory class

oak pilot
#

It's a field

#

Of type Product and name product

#

An attribute if you prefer

brazen bridge
#

Oh! it's a class field so what did you mean by type of Product

oak pilot
#

In java you have to give types to variables

spring hedge
#

think about a Person. it has perhaps two attributes. a String name and an int age

#

attribute = field = member = property

oak pilot
#

It's not like js where you can put anything in a variable

spring hedge
#

java has a strict type system. each variable has a fixed type/class

brazen bridge
#

but java is way better

#

than js shit

spring hedge
#

ull get used to it ๐Ÿ‘

brazen bridge
#

another small question..should I learn kotlin or java to build android apps

spring hedge
#

(i dont know)

#

the good thing about kotlin is that its put on top of java. so u have everything available that java has as well

#

and the approach to coding is the same

#

syntax is similar, but a tad different

brazen bridge
#

I'm asking stupid questions sorry..I have to do some research about this..I'm completely new to java

#

sorry

oak pilot
brazen bridge
spring hedge
delicate hound
limber rapidsBOT
#

Closed the thread due to inactivity.

If your question was not resolved yet, feel free to just post a message to reopen it, or create a new thread. But try to improve the quality of your question to make it easier to help you ๐Ÿ‘