方法一:

        Intent intent = new Intent();
intent.setClassName(this, "com.wuyou.twoactivity.OtherActivity");
startActivity(intent);

方法二:(使用了类字节码文件,将方法一运行时的错误转移到编译时错误)

        Intent intent = new Intent(this, OtherActivity.class);
startActivity(intent);

可见方法二比方法一好。

最新文章

  1. mobx源码解读4
  2. jQuery cxSlide 焦点图轮换
  3. WebApi:自定义筛选器
  4. 第43讲:Scala中类型变量Bounds代码实战及其在Spark中的应用源码解析
  5. 美丽渐变色的Form
  6. JavaScript对象 + Browser 对象 + HTML DOM 对象
  7. [转载]Linux LVM硬盘管理及LVM扩容
  8. Objective-C:KVC
  9. webapp 性能优化
  10. angularJS 自定义元素和属性
  11. django模型——数据库(二)
  12. android使用smack实现简单登录功能
  13. orcFile split和读数据原理总结(hive0.13)
  14. c++创建文件夹以及子文件夹
  15. poj-3279 poj-1753(二进制枚举)
  16. python基础学习笔记(十)
  17. 674. Longest Continuous Increasing Subsequence
  18. springmvc 通过@ResponseBody 返回json的中文乱码解决方案2个
  19. eclipse netbeans 代码模板
  20. linux安装xgboost

热门文章

  1. 在WinForm中使用委托来在其他线程中改变控件的显示
  2. C++中各种数据量类型转换
  3. 购买SSD固态硬盘须当心,你知道什么是SLC、 MLC、TLC闪存芯片颗粒吗?
  4. 11.10 noip模拟试题
  5. Java SE (1)之 JFrame 组件 FlowLayout 布局
  6. getSharedPreferences()与getSharedPreferences()与getDefaultSharedPreferences()的区别
  7. MVP快速开发框架
  8. 浅谈iOS开发的协议(protocol)和代理(delegate)
  9. 3DTouch
  10. 《C++ Primer》P314中使用insert重写单词统计程序的扩展