首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
在下面的例子里 using System; class A { public A(){ PrintFields(); } public virtual void PrintFields(){}
在下面的例子里 using System; class A { public A(){ PrintFields(); } public virtual void PrintFields(){}
admin
2019-03-29
72
问题
在下面的例子里
using System;
class A
{
public A(){
PrintFields();
}
public virtual void PrintFields(){}
}
class B:A
{
int x=1;
int y;
public B(){
y=-1;
}
public override void PrintFields(){
Console.WriteLine("x={0},y={1}",x,y);
}
}
当使用new B()创建B的实例时,产生什么输出?
选项
答案
x=1,y=0
解析
转载请注明原文地址:https://kaotiyun.com/show/FxmZ777K
0
程序员面试
相关试题推荐
ForAmerica’schildrentheeducationsystemisoftenliterallyalottery.ThatisthemainmessageofanewdocumentaryaboutAm
RememberNapsterorGrokster?Bothservicesalloweduserstosharecomputerfiles—usuallydigitalmusic—thatinfringedthecopyr
[A]Updateyourbudget[B]Submitachangeofaddressform[C]Bookacleaningservicebeforehand[D]Scheduleawalk-t
将金山网镖应用程序规则列表中的应用程序QQ2009删除。
在PPoint中,被选中对象虚框上的8个小方框称为()。A.尺寸控制点B.文本插入点C.有效区域范围D.选中对象标记
请打开“计算器”应用程序,利用科学型模式将十进制的1234转换为十六进制。
数据库系统的三级模式分别为()模式、内部级模式与外部级模式。
从目前技术来看,下列打印机中打印速度最快的是________。
随机试题
AtthebeginningoftheGreatDepression,thefirstblowtothestockmarketcameon______,1929,calledtheblackThursday.(
抑不知生之志,蕲胜于人而取于人耶?
下列符合循环免疫复合物导致的肾小球肾炎的描述是
肺热咳喘宜首选的药是()
下列哪项不是寒凉药性所表示的作用()
法定检验检疫的出口货物经检验检疫不合格并已签发不合格通知单的,检验检疫机构按收费标准的( )收取检验检疫费。
精神状态包括()。
A.刮治术B.纯截骨术C.截骨+植骨D.颌骨矩形切除术E.截骨+钛板植入较小型成釉细胞瘤主要采用()。
下列只包含进程互斥问题的是(16)。
Hetoldustouseourdictionariesto______anywordswedidn’tunderstand.
最新回复
(
0
)