[Java高手来翻译下]Java语言规范JLS 6.6.2 翻译
6.6.2 Details on protected Access
A protected member or constructor of an object may be accessed from outside
the package in which it is declared only by code that is responsible for the implementation
of that object.
6.6.2.1 Access to a protected Member
Let C be the class in which a protected member m is declared. Access is permitted
only within the body of a subclass S of C. In addition, if Id denotes an
instance field or instance method, then:
• If the access is by a qualified name Q.Id, where Q is an ExpressionName,
then the access is permitted if and only if the type of the expression Q is S or a
subclass of S.
• If the access is by a field access expression E.Id, where E is a Primary
expression, or by a method invocation expression E.Id(. . .), where E is a
Primary expression, then the access is permitted if and only if the type of E is
S or a subclass of S.
6.6.2.2 Qualified Access to a protected Constructor
Let C be the class in which a protected constructor is declared and let S be the
innermost class in whose declaration the use of the protected constructor
occurs. Then:
• If the access is by a superclass constructor invocation super(. . .) or by a
qualified superclass constructor invocation of the form E.super(. . .), where
E is a Primary expression, then the access is permitted.
• If the a
相关问答:
我想用Java写一个程序,就是我想在运行代码后,在指定的时间打开某程序,例如我运行代码后,讲在12:00打开"D:\Program Files\Tencent\QQ2009\Bin\QQ.exe"这个程序,求高人指点。还有可能的话在指定的时间 ......
private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
private static final String USERNAME = "sys";
private static final String PASSWORD = "s ......
<?xml version="1.0" encoding="utf-8" ?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical&q ......
CREATE DATABASE ADDRESSLIST;
USE ADDRESSLIST;
DROP TABLE IF EXISTS FRIEND;
CREATE TABLE FRIEND
(FRIEND_ID INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY ,
FRIEND_NAME VARCHAR(20) NOT N ......
我是个新手,做一个JSP网页,我要读出数据库正常,但是我要修改的时候,也就是读入的时候出现乱码,请高手告诉我怎么解决,先谢谢了。
request.setCharacterEncoding("UTF-8");
把编码统一
/**
......