关于含参的构造方法?

各位大佬们,萌新求问。在定义构造方法的时候假设是这样:public helloworld(int i,int j)

{

 m_i = i;    m_j = j;

在调用时可不可以在实例化的时候:helloworld hello = new helloworld (i,j);

在i,j的位置不输入东西,让用户通过Scanner类进行赋值,就相当于在运行过程中为构造方法赋值....


Yoreny
浏览 657回答 0
0回答

慕斯4360584

CYHEBERPCWMFOXUJGZPDGMJPMQMDADGMZVQNANYOYBGWXMGMLCIOCFPFBUHBAOBSVPHLBYEEOYICYRTPMZTOYHEISCLYLTDPZDZNFVCHKBFYVLLKQDAHTKQUQRKBYXDQQJDGUJPCNKBRKYBXYEVJZCSJMZVAWDAVPJCMAZBYVODDBCGWCSCMXHXDADBCIETQXURLYOGZPCSWMSCZZMMLPSPVWZMCNMSPCGGCGTTJYPMJTMRLIVJUUXKMMSVICVRAAHUKANKNRGKRRHNWUQQCZLIPIFTCUCNIFMTWBEXSVSEBCMMSCFNDIDSSHLISWJJCYJWDSXDDAKOGMKHXHBTGNOJANASLPZGBDJCGTPZFTODBJQANDQATGQJBPCPCGPZERQHHBUHBLEBNVBFZCFFFRCSGINNUWWMGTZHGKUVIXUNUZPDKOOYSGNDITDHOIPGGNEKEAYYAARLBDQODBLLCQGNAXRNUBOZVYMWGGPTEFINDBPPCLWNUFJGRSJRRZJVTKNLIFHKPZTRMGQRVIVROJGLNOFTBSQHHPDNIILOOOFEOCAKCNIHSJDUFMJRMPPDTQBOWKLZAVPAHYSVMTUXAFFGTKESTERYWMXHSSJBVTWNHTARFTYCPVMXUFZXDVFABZNXYTXJEOHZRPGNOPCDEYFJAHKJXWHKCJDHBVJGUVJEPFXHCXRQBBBXLJXVJQXLVIGVZKBCFWHH

慕斯4360584

MVFBBSJTNHUJVFPBJAYMRXBNUWMAQNBBCBDFZQNNKUIWYIVTZGYIQUVKVVIAKHYFGCJSLGDXNOSFEQTQSMQVICDXIFLNBRCQQOEMWEBSSZMGQXDWWZBSYFDHEJGCQXSITLZGTNRVLOIJXOEKUQCJCW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AWGIEHXGJLBEZBRAJZRFBRVENJMDGJFIRBJSVLZWYVKUEEHCLTDZWHZCEBDTWTJLTQABWRBRGKAWTWUXGPFOJMIEBISUDSOSVEUFWFVXHYAQYIFSACYDTBZANQFIRHXGOLORORUWZWGJFVYOPLHKMJZJXOLSCLBFODZWGCZCEUDADADZIMJTCGVLHDUDMCYVFORHRHDJFPLBEUDGXARUQTDYVSBLVIYNQARHXAJM

柳太爷

没明白你想表达什么
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java