单选题Which method is an appropriate way to determine the cosine of 42 degrees?()ADouble d = Math.cos(42);BDouble d = Math.cosine(42);CDouble d = Math.cos(Math.toRadians(42));DDouble d = Math.cos(Math.toDegrees(42));EDouble d = Math.cosine(Math.toRadians(42)

题目
单选题
Which method is an appropriate way to determine the cosine of 42 degrees?()
A

 Double d = Math.cos(42);

B

 Double d = Math.cosine(42);

C

 Double d = Math.cos(Math.toRadians(42));

D

 Double d = Math.cos(Math.toDegrees(42));

E

 Double d = Math.cosine(Math.toRadians(42));


相似考题
更多“单选题Which method is an appropriate way to determine the cosine of 42 degrees?()A  Double d = Math.cos(42);B  Double d = Math.cosine(42);C  Double d = Math.cos(Math.toRadians(42));D  Double d = Math.cos(Math.toDegrees(42));E  Double d = Math.cosine(Math.toR”相关问题
  • 第1题:

    下列哪个选项是正确计算42°(角度)的余弦值?

    A.double d=Math.cos(42);

    B.double d= Math.cosine(42);

    C.double d=Math.cos(Math.toRadians(42));

    D.double d=Math.cos(Math.toDcgrees(42));


    正确答案:C
    解析:public stahc double cos(doublea)是Math类中返回以弧度a为单位的cos值的,应先用toRadians()方法将42度转换为弧度值。

  • 第2题:

    下列( )选项是正确计算42度(角度)的余弦值。

    A.doubled=Math.cos(42);

    B.doubled=Math.cosine(42);

    C.doubled=Math.cos(Math.toRadians(42));

    D.doubled=Math.cos(Math.toDegrees(42));


    正确答案:C

  • 第3题:

    下列哪个选项是正确计算42度(角度)的余弦值?

    A.double d=Math.cos(42);

    B.double d=Math.cosine(42);

    C.double d=Math.cos(Math.toRadians(42) );

    D.double d=Math.cos(Math.toDegrees(42) );


    正确答案:C
    解析:publicstaticdoublecos(doublea)是Math类中返回以弧度a为单位的cos值的,应先用toRadians()方法将42度转换为弧度值。

  • 第4题:

    Which will declare a method that is available to all members of the same package and be referenced without an instance of the class?()

    • A、 abstract public void methoda ();
    • B、 public abstract double inethoda ();
    • C、 static void methoda (double dl) {}
    • D、 public native double methoda () {}
    • E、 protected void methoda (double dl) {}

    正确答案:C

  • 第5题:

    Which two are valid declarations within an interface definition?() 

    • A、 void methoda();
    • B、 public double methoda();
    • C、 public final double methoda();
    • D、 static void methoda(double d1);
    • E、 protected void methoda(double d1);

    正确答案:A,B

  • 第6题:

    Integer i = new Integer (42);  Long 1 = new Long (42);  Double d = new Double (42.0);   Which two expressions evaluate to True?()

    • A、 (i ==1)
    • B、 (i == d)
    • C、 (d == 1)
    • D、 (i.equals (d))
    • E、 (d.equals (i))
    • F、 (i.equals (42)

    正确答案:D,E

  • 第7题:

    Which method is an appropriate way to determine the cosine of 42 degrees?()

    • A、 Double d = Math.cos(42);
    • B、 Double d = Math.cosine(42);
    • C、 Double d = Math.cos(Math.toRadians(42));
    • D、 Double d = Math.cos(Math.toDegrees(42));
    • E、 Double d = Math.cosine(Math.toRadians(42));

    正确答案:C

  • 第8题:

    Which will declare a method that is available to all members of the same package and can be referenced without an instance of the class?()  

    • A、 Abstract public void methoda();
    • B、 Public abstract double methoda();
    • C、 Static void methoda(double d1){}
    • D、 Public native double methoda()  {}
    • E、 Protected void methoda(double d1)  {}

    正确答案:C

  • 第9题:

    单选题
    Which will declare a method that forces a subclass to implement it? ()
    A

     Public double methoda();

    B

     Static void methoda (double d1) {}

    C

     Public native double methoda();

    D

     Abstract public void methoda();

    E

     Protected void methoda (double d1){}


    正确答案: B
    解析: 暂无解析

  • 第10题:

    单选题
    字面常量42、4.2、42L的数据类型分别是(  )。
    A

    long,double,int

    B

    long,float,int

    C

    int,double,long

    D

    int,float,long


    正确答案: A
    解析:
    对于整型字面常量,只要没有超过C++中整数所能表示的范围,C++将自动按整数来存储此数,即int型,也可以通过在整型字面常量后添加u或L来指定无符号整数或长整数来存储。

  • 第11题:

    单选题
    Which will declare a method that is available to all members of the same package and be referenced without an instance of the class?()
    A

     abstract public void methoda ();

    B

     public abstract double inethoda ();

    C

     static void methoda (double dl) {}

    D

     public native double methoda () {}

    E

     protected void methoda (double dl) {}


    正确答案: A
    解析: 暂无解析

  • 第12题:

    单选题
    Which will declare a method that is available to all members of the same package and can be referenced  without an instance of the class?()
    A

     Abstract public void methoda();

    B

     Public abstract double methoda();

    C

     Static void methoda(double d1){}

    D

     Public native double methoda(){}

    E

     Protected void methoda(double d1){}


    正确答案: C
    解析: 暂无解析

  • 第13题:

    下列能正确计算45°的余弦值的是( )。

    A.double d=Math.cos(45);

    B.double d=Math.cosine(45);

    C.double d=Math.cos (Math.toRadians(45));

    D.double d=Math.cos (Math.toDegress(45));


    正确答案:C
    解析:public static double cos(doublea)是Math类中返回以弧度a为单位的cos值的,应先用toRadians ()方法将45度转换为弧度值。

  • 第14题:

    字面常量42、4.2、42L的数据类型分别是( )。 A.long,double、intB.lon9、float、int

    字面常量42、4.2、42L的数据类型分别是( )。

    A.long,double、int

    B.lon9、float、int

    C.int、double、long

    D.int、float、long


    正确答案:C
    本题考查整型变量的类型和浮点变量的类型,42默认为int型数据,42后面加上L后,表示long型数据,4.2默认为double型数据。

  • 第15题:

    字面常量42、4.2、42L的数据类型分别是( )。

    A.long,double,int

    B.long,float,int

    C.int,double,long

    D.int,float,long


    正确答案:C

  • 第16题:

    Given:  Integer i = new Integer (42);  Long l = new Long (42);  Double d = new Double (42.0);   Which two expression evaluate to true?()

    • A、 (i = = l)
    • B、 (i = = d)
    • C、 (d = = l)
    • D、 (i.equals(d))
    • E、 (i.equals(i))
    • F、 (i.equals(42))

    正确答案:D,E

  • 第17题:

    Which of the following assignment is not correct?()         

    • A、 float f = 11.1;
    • B、 double d = 5.3E12;
    • C、 double d = 3.14159;
    • D、 double d = 3.14;.

    正确答案:A

  • 第18题:

    若程序中定义了以下函数 double myadd(double a,double b) { return(a+b); } 并将其放在调用语句之后,则在调用之前应该对该函数进行说明,以下选项中错误的说明是()

    • A、double myadd(double a,b);
    • B、double myadd(double,double);
    • C、double myadd(double b,double a);
    • D、double myadd(double x,double y);

    正确答案:A

  • 第19题:

    Which will declare the method that forces a subclass to implement it?()

    • A、 public double methoda ():
    • B、 static void methoda(double d1) {}
    • C、 public native double methoda ():
    • D、 abstract public foid methoda ():
    • E、 protected void methoda (double d1) {}

    正确答案:D

  • 第20题:

    单选题
    11. double d = Math.random();   Which is true about d after line 11?()
    A

     d >= 1.0

    B

     0.0 <= d < 1.0

    C

     0.0 <= d < Double.MAX_VALUE

    D

     0.0 <= d <= Double.MAX_VALUE

    E

     Double.MIN_VALUE <= d < Double.MAX_VALUE


    正确答案: B
    解析: 暂无解析

  • 第21题:

    多选题
    Given:  Integer i = new Integer (42);  Long l = new Long (42);  Double d = new Double (42.0);   Which two expression evaluate to true?()
    A

    (i = = l)

    B

    (i = = d)

    C

    (d = = l)

    D

    (i.equals(d))

    E

    (i.equals(i))

    F

    (i.equals(42))


    正确答案: D,A
    解析: 暂无解析

  • 第22题:

    单选题
    Which method is an appropriate way to determine the cosine of 42 degrees?()
    A

     Double d = Math.cos(42);

    B

     Double d = Math.cosine(42);

    C

     Double d = Math.cos(Math.toRadians(42));

    D

     Double d = Math.cos(Math.toDegrees(42));

    E

     Double d = Math.cosine(Math.toRadians(42));


    正确答案: C
    解析: 暂无解析

  • 第23题:

    单选题
    Which of the following assignment is not correct?()
    A

     float f = 11.1;

    B

     double d = 5.3E12;

    C

     double d = 3.14159;

    D

     double d = 3.14;.


    正确答案: B
    解析: 浮点数的赋值是带有小数点的数字缺省是double型的,如果在浮点数后面加f或者F则是float,后面加d或者D则是double,科学计数法形式的浮点数也是double型的,而double的精度比float高,将一个高精度的double赋值给一个低精度的float时需要进行强制类型转换,反之则不需要。

  • 第24题:

    多选题
    Integer i = new Integer (42);   Long 1 = new Long (42);  Double d = new Double (42.0); Which two expressions evaluate to True? ()
    A

    (i ==1)

    B

    (i == d)

    C

    (d == 1)

    D

    (i.equals (d))

    E

    (d.equals (i))

    F

    (i.equals (42))


    正确答案: E,B
    解析: 暂无解析