Nov 17, 2014

Another example with what we have learnt

Hey I'm going to do an another example for more understanding about what i told you in previous post. One more thing i need to say that the static keyword. if we create a method with static keyword that method will be comman method. Just think like that. I'll teach you more about when i teach you OOP concept.
Let's  do little exmaple.
Open the netbeans and create a new project and inside the main method, do the followings,
Output shoud be look like this.
In the above example there is "+" sign. In the java "+" sign do two things.
  • "+" with a string do the concatanation (join two strings) 
  •  "+" with numbers do the arithmatic operation "addition"
 
 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.