Table of Contents
Functions / Methods in Programming Languages
🔒 Please log in to unlock this course.
Related Questions
Question 1
What is a function in Java?
Locked. Enroll to open this question.
Question 2
Can a method return multiple values?
Locked. Enroll to open this question.
Question 3
What is call by value in Java?
Locked. Enroll to open this question.
Question 4
Can we pass objects to methods?
Locked. Enroll to open this question.
Question 5
What is an abstract method?
Locked. Enroll to open this question.
Question 6
Can a method be private?
Locked. Enroll to open this question.
Question 7
Can constructors be called like methods?
Locked. Enroll to open this question.
Question 8
Can we make a method final?
Locked. Enroll to open this question.
Question 9
What is recursion?
Locked. Enroll to open this question.
Question 10
What is a return type in Java methods?
Locked. Enroll to open this question.
Question 11
Difference between method overloading and overriding?
Locked. Enroll to open this question.
Question 12
Why are functions used in Java?
Locked. Enroll to open this question.
Question 13
What is the syntax of a Java function?
Locked. Enroll to open this question.
Question 14
What are the different types of functions in Java?
Locked. Enroll to open this question.
Question 15
What is a static function in Java?
Locked. Enroll to open this question.
Question 16
Can a static method access non-static variables?
Locked. Enroll to open this question.
Question 17
What is method overloading?
Locked. Enroll to open this question.
Question 18
Can we overload the main() method?
Locked. Enroll to open this question.
Question 19
What is method overriding?
Locked. Enroll to open this question.
Question 20
What happens if a method doesn’t return a value?
Locked. Enroll to open this question.
MCQ Section
MCQ 1
How many values can a method directly return in Java?
Locked. Enroll to open this MCQ.
MCQ 2
Which of the following is NOT allowed in Java?
Locked. Enroll to open this MCQ.
MCQ 3
What does the following method return? public int[] getData() { return new int[]{5, 10, 15}; }
Locked. Enroll to open this MCQ.
MCQ 4
If a method returns a custom class object containing 5 variables, how many values are actually…
Locked. Enroll to open this MCQ.
MCQ 5
Which keyword is used in Java to send a value back from a method?
Locked. Enroll to open this MCQ.
MCQ 6
Which of the following can be a return type in Java?
Locked. Enroll to open this MCQ.
MCQ 7
Which statement is correct?
Locked. Enroll to open this MCQ.
Get Programming Language updates by email
Short, practical lessons and course updates from Rumman Ansari. No spam.