In: Computer Science
foreach(int i ______ intArr)
Dear Student ,
As per the requirement submitted above , kindly find the below solution.
Question 1:
Answer :b.ArrayLists can be resized, Arrays cannot.
Explanation :
*************************:
Question 2:
Answer :a.add
Explanation :ArrayList add() method is used to add the element in the arraylist.
*************************:
Question 3:
Answer :b.Books[2];
Explanation :Books[2]; will get the third element from the array list.
*************************:
Question 4:
Answer :b.Having two or more method with the same name but different parameters
Explanation :
*************************:
Question 5:
Answer :a.Having a method in a child class which replaces a method of the same name in the parent class
Explanation :
*************************:
Question 6:
Answer :d.When an object is created.
Explanation :Constructor is called or run when object of the class is created.
*************************:
Question 7:
Answer :c.public class Child : Parent
Explanation :Inheritance in C# is using colon (:) operator.
*************************:
Question 8:
Answer :a.A method that can be overridden but does not have to be overridden
Explanation :A method that can be overridden but does not have to be overridden
*************************:
Question 9:
Answer :b.A method with no definition that must be overridden
Explanation :Abstract method is a method with definition and declared with abstract keyword.
*************************:
Question 10:
Answer :a.True
Explanation :Abstract class is class which is used as base class.Object of abstract class can not be creaeted.
*************************:
Question 11:
Answer :b.ChildClass myObject = new ParentClass();
Explanation :Child class can access the properties and methods from base class.
*************************:
Question 12:
Answer :.c.show
Explanation :MessageBox.show() causes a popup to display on the screen
*************************:
Question 13:
Answer :c.text
Explanation :text property of controls is used to set text.
*************************:
Question 14:
Answer :a.in
Explanation :foreach(int i in intArr)
*************************:
Question 15:
Answer :c.Part of a class, not an instance.
Explanation :Private variables can not be accessed using object of a class.
*************************
Question 16:
Answer :e.All of the above.
Explanation :
*************************
Question 17:
Answer :c.Properties can perform actions such as method calls
Explanation :Properties can have getter and setter methods.
*************************
Question 18:
Answer :c.instantiation
Explanation :Object is an instance of a class.
*************************
Question 19:
Answer :b.Private
Explanation :When no access specifier is specified then by default class fields are Private.
*************************
Question 20:
Answer :c.Implied in certain circumstances
Explanation :this keyword is used to refer to the current class.
*************************:
NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.