标题: [Oracle interview]What is the difference between declaring a variable and defining a variable? [打印本页] 作者: 曹凯 时间: 2013-8-16 15:06 标题: [Oracle interview]What is the difference between declaring a variable and defining a variable? 作者: 于军 时间: 2013-8-16 15:22
In declaration we just mention the type of the variable and it's name. We do not initialize it. But defining means declaration + initialization. e.g String s; is just a declaration while String s = new String ("abcd"); Or String s = "abcd"; are both definitions.