top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to prevent a method from being overridden in java?

+1 vote
415 views
How to prevent a method from being overridden in java?
posted Feb 2, 2016 by Abhishek Maheshwari

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Using "Final" Keyword while defining the method in the base class

answer Feb 7, 2016 by Ram Murthy Nagaraj
Similar Questions
0 votes

In the header.php file of my WordPress site I have the following code:

<?php
session_start();  
$_SESSION['refererurl'] = $_SERVER['HTTP_REFERER'];
?>

To test the above code, I placed the following code in the front-page.php file (and it works):

<?php
    echo $_SESSION['refererurl'];
?>

I want to track the referrer URL that led a visitor to my site from an external site for tracking purposes. The problem is that $_SERVER['HTTP_REFERER'] resets on page-load, so while the information is useful when a visitor first lands on my website, it's overwritten whenever the visitor navigates further into my site.

Is there any way to store the value of $_SERVER['HTTP_REFERER'] when a visitor first arrives at my site from an external site for as long as the visitor is on my site?

+1 vote

How would you prevent a client from directly instantiating your concrete classes?

...