Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C/C++ÓëJavaº¯ÊýÖØÔØÇø±ð!

#include <iostream>
using namespace std;
class Base {
public:
virtual void fn(int x) {
cout << "In Base class, int x = " << x << endl;
}
};
class SubClass : public Base {
public:
// º¯ÊýµÄÖØÔØ,ÕâÑùµÄÖØÔØ·½Ê½,ÔÚJavaÖÐÄÜÐÐ,ÔÚC/C++ÖÐÈ´²»ÐÐ
virtual void fn(float x) {
cout << "In SubClass, float x = " << x << endl;
}
};
void test(Base& b) {
int i = 1;
b.fn(i);
float f = 2.0;
b.fn(f);
}
int main() {
Base bc;
SubClass sc;
cout << "Calling test(bc)\n";
test(bc);
cout << "Calling test(sc)\n";
test(sc);
return 0;
}
Calling test(bc)
In Base class, int x = 1
In Base class, int x = 2
Calling test(sc)
In Base class, int x = 1
In Base class, int x = 2
ÔËÐгɹ¦£¨×ܼÆʱ¼ä£º 312ºÁÃ룩
×¢Òâ,¶¼Êǵ÷Óõĸ¸ÀàÖеĺ¯Êý.
package cn.vicky;
public class MyTest {
public void add(int i) {
System.out.println("in parent");
}

public static void main(String[] args) {
MyTest2 m2 = new MyTest2();
m2.add(1);
m2.add(1.1);
}
}
class MyTest2 extends MyTest {
public void add(double i) {
System.out.println("in child");
}
}
  
in parent
in child
JavaÈ´¿ÉÒÔÇø·Ö...


Ïà¹ØÎĵµ£º

java:Applet²¼¾ÖÎÊÌâ,ÈçºÎÌí¼Ó°´Å¥£¬±êÇ©ÎÊÌâ×ܽá

½ñÌìѧϰÁËapplet²¼¾ÖÎÊÌ⣺
°´Å¥¡¢±êÇ©ÊÇÔõÑù¼ÓÈëµ½applet³ÌÐò(ÈÝÆ÷)µ±ÖÐÈ¥µÄÄØ£¿
ÐèÒªÓõ½²¼¾ÖÈÝÆ÷¹ÜÀíÆ÷(LayoutManager)£ºËüÓÃÓÚЭÖúÈÝÆ÷È·¶¨¼ÓÈëµÄ×é¼þ(°´Å¥µÈ)Ó¦¸Ã·ÅÖõÄλÖÃ
awtÌṩÁË4Öг£ÓõIJ¼¾ÖÈÝÆ÷¹ÜÀíÆ÷
>>FlowLayout
>>BorderLayout
>>GridLayout
>>CardLayout
appletĬÈÏÊ¹Ó ......

»ù´¡ JAVA¶ÔMysql½øÐÐÁ¬½Ó¡¢²åÈë¡¢Ð޸ġ¢É¾³ý²Ù×÷

Êý¾Ý¿â±íµ¥µÄ´´½¨
mysql> create database shuishengmu;
Query OK, 1 row affected (0.00 sec)
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql    & ......

java¶ÁÈ¡xmlÅäÖÃÎļþ

xmlÎļþÈçÏ ÅäÖù¦ÄÜ¿ª¹Ø
<Configurations>
    <Samples>true</Samples>
    <Excepts>true</Excepts>
    <CheckFace>false</CheckFace>
    <ThumbNail>false</ThumbNail>
  &nbs ......

c/c++ÄÚ´æ»®·Ö

Ò»¡¢Ò»¸ö¾­¹ý±àÒëµÄC/C++µÄ³ÌÐòÕ¼ÓõÄÄÚ´æ·Ö³ÉÒÔϼ¸¸ö²¿·Ö£º
¡¡¡¡1¡¢Õ»Çø£¨stack£©£ºÓɱàÒëÆ÷×Ô¶¯·ÖÅäºÍÊÍ·Å £¬´æ·Åº¯ÊýµÄ²ÎÊýÖµ¡¢¾Ö²¿±äÁ¿µÄÖµµÈ£¬ÉõÖÁº¯ÊýµÄµ÷Óùý³Ì¶¼ÊÇÓÃÕ»À´Íê³É¡£Æä²Ù×÷·½Ê½ÀàËÆÓÚÊý¾Ý½á¹¹ÖеÄÕ»¡£
¡¡¡¡2¡¢¶ÑÇø£¨heap£© £ºÒ»°ãÓɳÌÐòÔ±ÊÖ¶¯ÉêÇëÒÔ¼°ÊÍ·Å£¬ Èô³ÌÐòÔ±²»ÊÍ·Å£¬³ÌÐò½áÊøʱ¿ÉÄÜÓÉOS»ØÊÕ ......

CÑÕÉ«±ÈÕÕ±í


·½Ê½ ·ûºÅ³£Á¿ ÏÔʾÁÐ×ÐÐÊýºÍÑÕÉ«
0 BW40 40×25 ºÚ°×ÏÔʾ
1 C40 40×25 ²ÊÉ«ÏÔʾ
2 BW80 80×25 ºÚ°×ÏÔʾ
3 C80 80×25 ²ÊÉ«ÏÔʾ
7 MONO 80×25 µ¥É«ÏÔʾ
-1 LASTMODE ÉÏÒ»´ÎµÄÏÔʾ·½Ê½
Turbo C Ò²¿ÉÒÔÈÃÓû§¸ù¾Ý×Ô¼ºµÄÐèÒªÖØÐÂÉ趨ÏÔʾ´°¿Ú£¬Ò²¾ÍÊÇ˵£¬Í¨¹ýʹÓô°¿ÚÉè
Öú¯Êýwi ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ