Java Programming Tutorial - 18 - Getting user Input and Creating Objects

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ม.ค. 2025

ความคิดเห็น • 24

  • @kristiangrundstrom
    @kristiangrundstrom 6 ปีที่แล้ว +6

    Simple and well explained tutorial. Thanks!

    • @UniProgrammer
      @UniProgrammer  6 ปีที่แล้ว +1

      Kristian Grundström Thanks!

  • @xelionizer
    @xelionizer 4 ปีที่แล้ว +3

    Thanks for the ul. I have a different question though; how would you go about making a new instance of the Account class via user input? No matter what I've tried, the text that is entered after a class name is treated as the name of that particular instance.. Does that make sense? Cheers m8

  • @xy4611
    @xy4611 2 ปีที่แล้ว +3

    but
    how can we change acct1 name?
    will all objects named as acct1?

    • @ryan4thewin
      @ryan4thewin 8 หลายเดือนก่อน

      Im searching for this response everywhere on the internet. How do i create a new class object using user input??

    • @xy4611
      @xy4611 8 หลายเดือนก่อน

      ​@@ryan4thewin ok as i learned
      you dont
      you store them in arraylist, array, hashmap etc.

  • @stevetriple8
    @stevetriple8 5 ปีที่แล้ว +1

    Super helpful, even my lecturer skims over simple but helpful stuff like this, thank you!!

  • @lquesada210
    @lquesada210 4 ปีที่แล้ว +2

    I FINALLY understand what I was doing wrong. Thank you so much!!

    • @kolehector4394
      @kolehector4394 3 ปีที่แล้ว +1

      I realize it's pretty off topic but do anyone know of a good place to stream newly released series online?

    • @joshuaowen6822
      @joshuaowen6822 3 ปีที่แล้ว

      @Kole Hector lately I have been using Flixzone. Just search on google for it =)

    • @muhammadraul6355
      @muhammadraul6355 3 ปีที่แล้ว

      @Matthias Alonso definitely, I have been using FlixZone for years myself :D

    • @felixvictor3234
      @felixvictor3234 3 ปีที่แล้ว

      @Matthias Alonso thanks, I went there and it seems to work :D I really appreciate it !

    • @maddoxdouglas4138
      @maddoxdouglas4138 3 ปีที่แล้ว +1

      @Kole Hector No problem =)

  • @crassbmt
    @crassbmt 5 ปีที่แล้ว

    for the object parameter in acct1 why did you use "amount" instead of balance? are we getting the object parameter values from the constructor? Are the parameter values in the tostring always the same as the instance variable that change in the constructor?

    • @UniProgrammer
      @UniProgrammer  5 ปีที่แล้ว

      The "amount" variable was only used to create the acct1 object.
      The amount variable belongs (is in the scope of) to the BankProgram class.
      When the amount was passed in as a parameter, and the acct1 object was instantiated (by the Account class) the constructor created the object in memory and set that object's "balance" to what was passed in as the "amount".
      The constructor initializes and sets the values and attributes when objects are instantiated, but those values can be changed later with setter (mutator) methods later on.
      The toString method retrieves what the current variable data is set to.
      Hope that helps.

  • @srinivasseenu1893
    @srinivasseenu1893 3 ปีที่แล้ว

    can this be done in a single code

  • @marcelrooneydisalan2759
    @marcelrooneydisalan2759 4 ปีที่แล้ว

    How can I merge it into one java file?

  • @srinivasseenu1893
    @srinivasseenu1893 3 ปีที่แล้ว

    why are u doing two different codes

  • @sportsuk6769
    @sportsuk6769 4 ปีที่แล้ว

    Thank you :)

  • @TectonicTardigrade
    @TectonicTardigrade 5 ปีที่แล้ว

    THANK YOU!!!!!!!!!!!!

  • @omerameen5900
    @omerameen5900 4 ปีที่แล้ว

    Very helpful...just a advice can you please skip the sound of your keyboard typing.. It is really annoying... The video is good.. Thanks 👌🏻😊