Java QuestionAnswer

Helps readers to ask any new questions on any topic. Also, they can provide solutions in the comment box.

QnA || How to use Constructors in Abstract class?

As we know that an abstract class can have constructors, data members, and non-abstract methods as well. This chapter will shows, how we can declare and use the Constructors in the abstract class. Important Features of Abstract Class and Methods Abstract Class An abstract class would be declared using the ‘abstract’ keyword. The creation of …

QnA || How to use Constructors in Abstract class? Read More »

QnA | Can main method be overloaded?

Question: Can main method be overloaded? or Can a java program have multiple methods with name “main” keyword? Answer: Yes, the Main method can also be overloaded same as normal method overloading techniques. Method overloading is a sub-process of Polymorphism. To achieve method overloading we have to declare and define multiple methods with the same name but …

QnA | Can main method be overloaded? Read More »

QnA | How do I reverse a String/Sentence in Java?

Question: Print Hello World as ‘Olleh Dlrow’ using Java. Problem Write a program to reverse a String or we can say that reverses each word in a sentence and also while printing the first letter should be in upper case. Input can contain any number of words as mentioned below: Input String:- Hello Worldask for helpYou Live Only Once …

QnA | How do I reverse a String/Sentence in Java? Read More »

QnA | Perform Multiplication and Division without * or / or % operators.

Problem: How to write a program that can be used for Multiplication or Division two integer values without using “*” operator and “/” or “%” operators? Example:Inputs:-6 and 3 (Multiply)50 and 10 (Multiply)18 and 2 (Divide)39 and 4 (Divide)Output:-Multiplication of 6 and 3 = 18Multiplication of 50 and 10 = 500Division of 18 and 6:Quotient 3 …

QnA | Perform Multiplication and Division without * or / or % operators. Read More »

   YouTube ChannelQuora

            Ashok Kumar is working in an IT Company as a QA Consultant. He has started his career as a Test Trainee in manual testing in August 2010. Then he moves towards the automation testing after 4 years. He started learning JAVA and Selenium by self to get the knowledge of automation.

       While learning these tools and working on multiple projects, he found that sometimes people get stuck in live scenarios in their project and they have to do lots of RnD to get out of it. So he decided to start blogging only for such scenarios, where anyone facing any problem in their project, can ask any question or give a solution or you can say an alternate solution to achieve the goal successfully.

Later on, he observed that some people want to learn Java but they have few questions in their mind like how to start Java, whether we should go for the online or offline course. So he started writing tutorials on Java, Jira, Selenium, Excel etc.