Home > Java (Page 3)

Flowchart in Software Engineering / Testing

What is FlowchartA pictorial representation of an algorithm is called a 'Flowchart'. In flowchart, the steps in the algorithm are represented in the form of different shapes of boxes and the logical flow is indicated by interconnecting arrows. The boxes are used to represent different operations and the arrows are

This Article is TAGGED in , . Read more

Simple way to generate connection string from text file

Common issue generally every developer faces in his initial days of development is how to generate connection string that connects my application to the database. Especially when we don't have sql management studio installed or if we are facing licensing issues.Well, a text file can come to a rescue.  To overcome such

This Article is TAGGED in , , , , , , . Read more

Method overloading in Java – Part 1

What is method overloading in Java?If two or more methods in a class have same name but different parameters, it is known as method overloading. Method overloading is one of the ways through which java supports polymorphism. Method overloading can be done by changing number of arguments or by changing

This Article is TAGGED in , , , , , . Read more

Method overloading in Java – Part 2

Method overloading with type promotion:One type is promoted to another implicitly if no matching datatype is found. Let's understand the concept by the figure given below: Example: Method Overloading with Type Promotion[crayon-67676fdf71176670556910/][crayon-67676fdf7117a227608454/]If there are matching type arguments in the method, type promotion is not performed:Example: Method Overloading with Type Promotion if

This Article is TAGGED in , . Read more

Method Overriding in Java: – PART-2

 Real example of Java Method Overriding:-Consider a scenario, Bank is a class that provides functionality to get rate of interest. But, rate of interest varies according to banks. For example, SBI, ICICI and AXIS banks could provide 5%, 6% and 7% rate of interest. [crayon-67676fdf714d1467971648/] [crayon-67676fdf714d5977432225/]Advantages of method overridingThe main advantage of

This Article is TAGGED in , , . Read more