华为公司招聘java程序员面试题

VIP免费
2024-12-10 0 0 102.5KB 27 页 5.9玖币
侵权投诉
华为公司招聘 java 程序员面试题
第一部分:选择题
  QUESTION NO: 1
  1public class Test {
  public static void changeStr(String str){
  str="welcome"; 九塾教育 http://rooms9.com
  }
  public static void main(String[] args) {
  String str="1234";
  changeStr(str);
  System.out.println(str);
  }
  }
  Please write the output result :
  QUESTION NO:2
  1. public class Test {
  2. static boolean foo(char c) {
  3. System.out.print(c); 九塾教育 http://rooms9.com
  4. return true;
  5. }
  6. public static void main( String[] argv ) {
  7. int i =0;
  8. for ( foo('A'); foo('B')&&(i<2); foo('C')){
  9. i++ ;
  10. foo('D');
  12. }
  13. } 九塾教育 http://rooms9.com
  14. }
  What is the result?
  A. ABDCBDCB
  B. ABCDABCD
  C. Compilation fails.
  D. An exception is thrown at runtime.
QUESTION NO: 3
  1. class A {
  2. protected int method1(int a, int b) { return 0; }
  3. }
  Which two are valid in a class that extends class A? (Choose two)
  A. public int method1(int a, int b) { return 0; }
  B. private int method1(int a, int b) { return 0; }
  C. private int method1(int a, long b) { return 0; }
  D. public short method1(int a, int b) { return 0; }
  E. static protected int method1(int a, int b) { return 0; }
  QUESTION NO: 4
  1. public class Outer{
  2. public void someOuterMethod() {
摘要:

华为公司招聘java程序员面试题第一部分:选择题  QUESTIONNO:1  1、publicclassTest{  publicstaticvoidchangeStr(Stringstr){  str="welcome";九塾教育http://rooms9.com  }  publicstaticvoidmain(String[]args){  Stringstr="1234";  changeStr(str);  System.out.println(str);  }  }  Pleasewritetheoutputresult:  QUESTIONNO:2  1.publicclass...

展开>> 收起<<
华为公司招聘java程序员面试题.doc

共27页,预览2页

还剩页未读, 继续阅读

声明:本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。玖贝云文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知玖贝云文库,我们立即给予删除!
分类:计算机 价格:5.9玖币 属性:27 页 大小:102.5KB 格式:DOC 时间:2024-12-10

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 27
客服
关注