网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下面程序运行时输出的结果为
C:\Program Files is a directory.
将程序补充完整。
Import java.io.*;
public class DirTest {
public static void main(String[] args) {
File myDir=Flew File("C:/Program Files/");
System.out.println(myDir+(______.isDirectory()?"is":"is not")+"a directory.");
}
}
参考答案
更多 “ 下面程序运行时输出的结果为C:\Program Files is a directory.将程序补充完整。Import java.io.*;public class DirTest {public static void main(String[] args) {File myDir=Flew File("C:/Program Files/");System.out.println(myDir+(______.isDirectory()?"is":"is not")+"a directory.");}} ” 相关考题
考题
若下面程序运行时输出结果为1, A, 10.12, B, 3.5请将程序补充完整 。#includeusing namespace std;int main(){void test(int, char,double 【 8 】 );test(1,'A',10.1);test(2,'B');return 0;}void test(int a, char b, doubleC .{cout}
考题
(11 )下面程序运行时输出结果为C:\Program Files is a directory请将程序补充完整。import Java.io.*;public class DirTest{public static void main(String[] args){File myDir = new File( " C:/Program Files/ " );System.out.println(myDir + ( 【 11 】 .isDirectory() ? " is " : " is not " ) + " a directory. " );}}
考题
下面程序的输出结果为:Base:: fun,请将程序补充完整。include class Base{public: 【】
下面程序的输出结果为:Base:: fun,请将程序补充完整。include <iostream.h>class Base{public:【 】 fun(){cout<<"Base::fun"<<end1:}class Derived : public Base{public:【 】 fun(){ cout<<"Derived::fun"<<end1; }};int main(){Base a,*pb;Derived b;pb = b;pb->fun();return 0;}
考题
下列程序的输出结果为2,请将程序补充完整。 inelude using namespace std; class Bas
下列程序的输出结果为2,请将程序补充完整。inelude<iostream.h>using namespace std;class Base{public:______ void fun( ){cout<<1;}};class Derived: public Base{pbulic:void fubn( ){cout<<2;}};int main( ){Base*P=new Derived;P→fun( );delete P;return 0;}
考题
下列程序的输出结果为2,请将程序补充完整。 include using namespace std; class Basc
下列程序的输出结果为2,请将程序补充完整。include<iostream>using namespace std;class Basc{public:【 】void fun(){cout<<1;}};class Dcrived:public Base{public:void fun(){cout<<2;}};int main(){Base*p=new Derived;p->fun();delete p;return 0;}
考题
下列程序的输出结果为2,请将程序补充完整。 include using namespace std; class Base
下列程序的输出结果为2,请将程序补充完整。include<iostream>using namespace std;class Base{public:______void fun(){cout<<1;}};class Derived:public Base{public:void fun(){cout<<2;}};int main(){Base*p=new Derived;p->fur();delete p;return 0;}
考题
若下列程序运行时输出结果为 1,A,10.1 2,B,3.5 请将程序补充完整。 include using name
若下列程序运行时输出结果为1,A,10.12,B,3.5请将程序补充完整。include<iostream>using namespace std;int main(){void test(int,char,double______);test(1,'A',10.1);test(2,'B');return 0;}void test(int a,char b,double c){cout<<a<<','<<b<<','<<c<<end1;}
考题
下列程序的输出结果为2,请将程序补充完整。 include using namespaee std; class B
下列程序的输出结果为2,请将程序补充完整。include <iostream>using namespaee std;class Base{public:______void fun( ){cout<<1;}};class Derived:public Base{public:void fun( ){cout<<2;}};int main( ){Base*P=new Derived:p->fun( );delete P;return 0;}
考题
下面的程序代码执行之后,输出如下结果,请填写空白处将程序补充完整:
热门标签
最新试卷