Question Set

1. For the code snippet given below, which of the following statements are valid? public class MyContainer<T> where T: class, IComparable { //Insert code here } Class MyContainer requires that it's type argument must implement IComparable interface. Compiler will report an error for this block of code. There are multiple constraints on type argument to MyContainer class. Class MyContainer requires that its type argument must be a reference type and it must implement IComparable interface.






Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

Show Similar Question And Answers
QA->Two statements are given followed by two conclusions I and II. You have to consider the two statements to be true even if they seem to be at variance from commonly known facts. You have to decide which one of the given conclusions is definitely drawn from the given statements. Statement : All virtuous persons are happy. No unhappy person is virtuous. Conclusions : I. Happiness is related to virtue II. Unhappy person is not virtuous.....
QA->A statement followed by two assumptions I and II is given. You have to consider the statement to be true even if it seems to be at variance from commonly known facts. You are to decide which of the given assumptions can definitely be drawn from the given statement. Indicate which one of the four given alternatives is correct ? Statement : If more encouragement is given to Sports, Indians will win more gold medals at the Olympic Games. Assumptions : I. Indians do not win gold medals. II. More enc....
QA->There are two divisions A and B of a class, consisting of 36 and 44 students respectively. If the average weight of divisions A is 40 kg and that of division b is 35 kg. What is the average weight of the whole class?....
QA->The process in which a liquid changes into its vapour from its surface at a temperature below its boiling point is called?....
QA->There are 50 students in a class. In a class test 22 students get 25 marks each, 18 students get 30 marks each. Each of the remaining gets 16 marks. The average mark of the whole class is :....
MCQ->For the code snippet given below, which of the following statements are valid? public class MyContainer<T> where T: class, IComparable { //Insert code here } Class MyContainer requires that it's type argument must implement IComparable interface. Compiler will report an error for this block of code. There are multiple constraints on type argument to MyContainer class. Class MyContainer requires that its type argument must be a reference type and it must implement IComparable interface.....
MCQ->For the code snippet given below, which of the following statements are valid? public class MyContainer<T> where T: IComparabte { // Insert code here } Class MyContainer requires that it's type argument must implement IComparabte interface. Type argument of class MyContainer must be IComparabte. Compiler will report an error for this block of code. This requirement on type argument is called as constraint.....
MCQ->Which of the following statements are correct about an interface in C#.NET? A class can implement multiple interfaces. Structures cannot inherit a class but can implement an interface. In C#.NET, : is used to signify that a class member implements a specific interface. An interface can implement multiple classes. The static attribute can be used with a method that implements an interface declaration.....
MCQ->Which two statements are true for any concrete class implementing the java.lang.Runnable interface? You can extend the Runnable interface as long as you override the public run() method. The class must contain a method called run() from which all code for that thread will be initiated. The class must contain an empty public void method named run(). The class must contain a public void method named runnable(). The class definition must include the words implements Threads and contain a method called run(). The mandatory method must be public, with a return type of void, must be called run(), and cannot take any arguments.....
MCQ->Which of the following statements are correct about the C#.NET code snippet given below? namespace IndiabixConsoleApplication ( class Sample { private enum color : int { red, green, blue } public void fun() { Console.WriteLine(color.red); } } class Program { static void Main(string[ ] args) { // Use enum color here } } } To define a variable of type enum color in Main(), we should use the statement, color c; . enum color being private it cannot be used in Main(). We must declare enum color as public to be able to use it outside the class Sample. To define a variable of type enum color in Main(), we should use the statement, Sample.color c; . We must declare private enum color outside the class to be able to use it in Main().....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution