由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - An interview question.Java interface
相关主题
一个event model的概念级的问题Re: 问一个关于Java Native Interface的问题
问个入门问题。JDBC or SQL-C?
[转载] help please on JavaWhy Java needs clone interface?
Windows 下 Java console application 的问题是不是spring mvc用的很少
有这么问的么。。。一个土土的问题
Java如何调用MATLAB?How does a client find and connect to a specific
JAVA DOC 的问题What specific services does a container provide f
上次关于那个JAVA如何连接interface和implmtation的讨论Re: Can create a Interface object, why?
相关话题的讨论汇总
话题: interface话题: java话题: interview话题: c++
进入Java版参与讨论
1 (共1页)
S*******t
发帖数: 97
1
【 以下文字转载自 JobHunting 讨论区 】
发信人: Serverlet (M$), 信区: JobHunting
标 题: An interview question.Java interface
发信站: BBS 未名空间站 (Mon Sep 15 11:24:10 2008), 站内
why java use interface while c++ keeps multiple inheritance?
g*****g
发帖数: 34805
2
Because C++ is a mess and Java learns lesson out of it.

【在 S*******t 的大作中提到】
: 【 以下文字转载自 JobHunting 讨论区 】
: 发信人: Serverlet (M$), 信区: JobHunting
: 标 题: An interview question.Java interface
: 发信站: BBS 未名空间站 (Mon Sep 15 11:24:10 2008), 站内
: why java use interface while c++ keeps multiple inheritance?

S*******t
发帖数: 97
3
maybe I should ask this question on C++ board...

【在 g*****g 的大作中提到】
: Because C++ is a mess and Java learns lesson out of it.
S*********t
发帖数: 78
4
but you interviewed for a java position.
remember that.

【在 S*******t 的大作中提到】
: maybe I should ask this question on C++ board...
F****n
发帖数: 3271
5
这个问题问得真弱智

【在 S*******t 的大作中提到】
: maybe I should ask this question on C++ board...
A**o
发帖数: 1550
6
it's an easy question.

【在 F****n 的大作中提到】
: 这个问题问得真弱智
s***e
发帖数: 122
7
just say whatever you know about interface, such as: interface is a keyword
and first-class member in Java; Program to interface not to class; Prefer
interface inheritance to implementation inheritance. In short, interface is
a much better solution than multiple inheritance, Java learned the lesson.

【在 S*******t 的大作中提到】
: maybe I should ask this question on C++ board...
S*********t
发帖数: 78
8
the keypoint is: multi-inheritance cause a lot of problems.

keyword
is

【在 s***e 的大作中提到】
: just say whatever you know about interface, such as: interface is a keyword
: and first-class member in Java; Program to interface not to class; Prefer
: interface inheritance to implementation inheritance. In short, interface is
: a much better solution than multiple inheritance, Java learned the lesson.

s***e
发帖数: 122
9
well, the keypoint is you will be asked to give detailed explanation. I am
talking about how you could answer this question in an interview. now you
are in the position to explain what the problems are.

【在 S*********t 的大作中提到】
: the keypoint is: multi-inheritance cause a lot of problems.
:
: keyword
: is

F****n
发帖数: 3271
10
问得莫名其妙,“用”INTERFACE”和多继承一定矛盾吗,C++难道不用接口?

【在 A**o 的大作中提到】
: it's an easy question.
g*****g
发帖数: 34805
11
C++是没有接口这个概念,虽然你可以定义一个只有虚函数的母类。
另外很重要的是C++不是同根继承(所有java类继承Object类),
这也使得实现上产生困难。

【在 F****n 的大作中提到】
: 问得莫名其妙,“用”INTERFACE”和多继承一定矛盾吗,C++难道不用接口?
1 (共1页)
进入Java版参与讨论
相关主题
Re: Can create a Interface object, why?有这么问的么。。。
Re: question about interface.(也许是答案)Java如何调用MATLAB?
Re: Java Tip: ConstantJAVA DOC 的问题
can applet implements runnable?上次关于那个JAVA如何连接interface和implmtation的讨论
一个event model的概念级的问题Re: 问一个关于Java Native Interface的问题
问个入门问题。JDBC or SQL-C?
[转载] help please on JavaWhy Java needs clone interface?
Windows 下 Java console application 的问题是不是spring mvc用的很少
相关话题的讨论汇总
话题: interface话题: java话题: interview话题: c++