variable is still null after I assign a value to it JAVA

淺唱寂寞╮ 提交于 2019-12-02 01:46:54

You should change this

idc = Id_cliente;

to

Id_cliente = idc;. 

You are assigning a values to your method parameters, rather than fields. Same applies to all of the parameters in your constructor Cliente.

Your assignments are backwards in your constructor. Switch the left and right hand sides of all those and it should work.

Your constructor for the class Cliente is switching assignement. Change the idc = Id_cliente to Id_cliente = ic.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!