473,436 Members | 1,616 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,436 software developers and data experts.

What does the following codes do?

108 100+
import java.lang.*;
public class java17_test extends SecurityManager{

/**
* @param args
*/
public static void main(String[] args) {


System.setSecurityManager(new securityHouse());
System.exit(1);

}

}


class securityHouse extends SecurityManager{
public void house(){
checkExit(1);

}
}


I expected to get a SecurityException as soona as I invoked the System.exit(1) method but I failed to get one..
Is my logic right and are my codes meaningful?
Jul 18 '10 #1
0 1049

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Skyhorse | last post by:
What are the following codes doing? What are the meaning of & 0xffe00000, & 3, 0xf, 0x3? Is there any difference between & 3 and & 0x3? inline BOOL CheckAudioHeader(DWORD dwHeader) { if (...
2
by: Steve Richter | last post by:
What does the "." mean in the following sql script stmts? use GO if exists (select * from dbo.sysobjects where id = object_id(N'.') and OBJECTPROPERTY(id,N'IsUserTable') = 1) drop table ....
8
by: Kim Forbes | last post by:
I am learning Javascript; and most books only give you partial definitions for the functions they show you. Here is a line of code from a browser sniffing function: var isWin =...
5
by: Niu Xiao | last post by:
I saw a lot of codes like: void foo(void* arg) void bar(void** arg) f((void*)p) but what does void pointer mean in c? I just know it stands for generic pointer. thanks.
9
by: ziman137 | last post by:
Hi all, The results from following codes got me a bit confused. #include <stdio.h> #include <iostream> using namespace std; struct A {
5
by: thi | last post by:
Hi, Just curious what does the @ system means in c#. Some of the sample codes i read it written as: bool bExists = File.Exists(@"c:\\hello.txt"); but i can get the same result as using ...
5
by: Phil Ward | last post by:
The following has recently arose and it is the first time I have noticed this behaviour. I have been using a self-defined string class. It's form is class CMyString { public: ... (no public...
13
by: Protoman | last post by:
I'm getting an error: 10 C:\Dev-Cpp\Enigma.cpp no match for 'operator<' in 'i < (+cleartext)->std::basic_string<_CharT, _Traits, _Alloc>::end ()' Code: Enigma.hpp...
7
by: Meal | last post by:
The last line of the following codes makes the program crash. I cannot debug into the codes. It looks that I cannot use the dynamic_cast, but why? The cout shows that the node is DOM element node....
3
by: qianz99 | last post by:
Hi I am not sure what this code does. I have the following questions 1. where is the case? 2. #define TLV_INTEGER(name, octets) p->name = -1; Is it define a function TLV_INTEGER(name, octets) ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.