Which is best practice ?

hi everybody,
I have a silly doubt, which is good
import packagename.*;or
import packagename.classname;.. and wat is the diffference other than that, "*" means it will import all the classes in the package? will specifing the classname improve the java code execution or make it more optimized?
thanks for your comments
-- Abdel Raoof Olakara
http://olakara.googlepages.com

Definitely the performance problem is there if you
import using the "*" .
at run time it Load's all the classes.nope, it doesn't. import statements have nothing to do with classloading, they exist only at a source code level. classes are loaded lazily anyway, only when something actually goes to use them
So, specify the classes using class name explicitly,
it not only increase the performance but also it is
easy to understand who review's your codethe performance increase is a fallacy - well, possibly a slightly faster compile - but I agree with the readability, definately

Similar Messages

  • Is there a website or PDF somewhere which discusses best practices for producing a children's picture book? I am mostly interested in requirements for good image format, resolution, etc.

    Is there a website or PDF somewhere which discusses best practices for producing a children's picture book? I am mostly interested in requirements for good image format, resolution, etc.

    There may be a few links in Apple Support, regarding articles about how to use iBooks Author
    and iBooks Store, etc; these would be separated into two general categories by device used.
    Since there is an iOS and an OS X version of each, you may have to look to see what Apple
    Support says about the one you are interested in; and how far their database goes toward an
    answer to your question. Otherwise, a general search engine approach may be necessary.
    Not sure if anything along the lines of what you seek would be available in an App.
    References to iBooks Author and iBooks Store, etc appear within these two categories in Support:
    For Mac OS X:
    http://www.apple.com/support/mac-apps/
    For iOS:
    http://www.apple.com/support/ios/
    Appears a community host moved your earlier post into one of the iBooks Author or Store sections
    after I'd replied to what otherwise may be a similar post. Not sure if the links to the Discussions area
    of iBooks you are interested in, have similar questions or answers by others who'd visited previously.
    Is there a website or PDF somewhere which discusses best practices for producing a children's picture book? I am mostly interested in requirements for good image format, resolution, etc.
    In my reply to your earlier thread, prior to it being moved, those links to sections of iBooks Author, etc
    are posted. You can also find them from the main Apple Support Communities page.
    Sorry to not be of much help in this matter.
    Good luck & happy computing!

  • In Oracle, which is best practice for 'NOT EQUAL TO'

    I need to check for where a decimal value is not zero.
    Am I better to use
    'less than symbol or greater than symbol' 0
    or
    != 0or does Oracle substitute 'less than symbol or greater than symbol' to != effectively ?
    In my mind if it doesn't the 'less than symbol or greater than symbol' would be slower because it has to check if the value is greater than OR less than.
    I appreciate != is not SQL-92 compliant.
    I appreciate it would be less than a nano second difference but they all add up!
    Thanks
    The 'less than symbol or greater than symbol' do not show it seems as they are used in HTML.
    Edited by: cubmar on Jun 5, 2009 11:16 AM
    Edited by: cubmar on Jun 5, 2009 11:21 AM

    Even though The CBO is cleverly written program it does makes its assumptions. When ever the Optimizer finds a NOT operator it assumes that is going to fetch a large portion of the data and goes for a FULL TABLE SCAN. INDEX SCAN Is not an option.
    And hence if you are not going to select a large portion of the data using NOT can be expensive.
    Below is an example.
    i have created a table which has one record with value as 1 and 99999 records with value as 0.
    SQL> create table t
      2  as
      3  select decode(level,1,1,0) no, rpad('*',100,'*') name
      4    from dual
      5  connect by level <= 100000
      6  /
    Table created.
    SQL> create index t_idx on t(no)
      2  /
    Index created.
    SQL> exec dbms_stats.gather_table_stats(user,'T',cascade=>true)
    PL/SQL procedure successfully completed.so when i use the condition no != 0 i am gong to select only 1 record. So i expect the optimizer to go for a INDEX RANGE SCAN but see what happens.
    SQL> explain plan
      2  for
      3  select * from t where no != 0
      4  /
    Explained.
    SQL> select * from table(dbms_xplan.display)
      2  /
    PLAN_TABLE_OUTPUT
    Plan hash value: 1601196873
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |   103 |   345   (2)| 00:00:05 |
    |*  1 |  TABLE ACCESS FULL| T    |     1 |   103 |   345   (2)| 00:00:05 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - filter("NO"<>0)
    13 rows selected.But with the use of < or > you can go for a INDEX RANGE SCAN.
    SQL> explain plan
      2  for
      3  select * from t where no >0 or no <0
      4  /
    Explained.
    SQL> select * from table(dbms_xplan.display)
      2  /
    PLAN_TABLE_OUTPUT
    Plan hash value: 4259936809
    | Id  | Operation                    | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |       |     2 |   206 |     6   (0)| 00:00:01 |
    |   1 |  CONCATENATION               |       |       |       |            |          |
    |   2 |   TABLE ACCESS BY INDEX ROWID| T     |     1 |   103 |     3   (0)| 00:00:01 |
    |*  3 |    INDEX RANGE SCAN          | T_IDX |     1 |       |     2   (0)| 00:00:01 |
    |   4 |   TABLE ACCESS BY INDEX ROWID| T     |     1 |   103 |     3   (0)| 00:00:01 |
    |*  5 |    INDEX RANGE SCAN          | T_IDX |     1 |       |     2   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
       3 - access("NO"<0)
       5 - access("NO">0)
           filter(LNNVL("NO"<0))
    19 rows selected.So you must be cautious when you use NOT operator.

  • Best Practice On Taking Count in Bean

    Hi folks,
      Here i'm using Jdev 11.1.1.7.0. where I have a case take count on inserted rows in bean.
    here we go..
    Bean code
    developer way 1:
    button_click(){
    int count = voins.getRowcount();
    developer way 2:
    button_click(){
    int count = iteratorbind.getEstimatedRowcount();
    developer way 1: fetching view object in bean for purpose of taking row count.
      ---developer 1 says that best practice on taking count is using view object 'getRowcount()'.
    Note: developer 1 comment that developer 2 way is worst practice. it's a time taken process
    developer way 2: using iterator getting row count
      ---developer 2 says that for taking count we can use 'estimatedRowcount'.
    Note: developer 2 comment that developer 1 way is worst practice taking view object on bean.
    i.e developer 1 try catch the model layer directly from the code. we can use iterator to do all the stuff.
    which is best practice please suggest me... is there any other practice taking row count in bean.
    thanks.

    Dev way 1)
    A look into the java doc reveals
    Note that this method retrieves all rows from the database then returns the number of rows in the Row Set collection.
    So if your table contains a lot of rows calling getRowCount takes a lot of time and memory.
    Dev way 2)
    Calling getEstimatedRowCount executes a select count(*) from (your query) to get the count. This is fast but the task count may differ if many changes are done on the table. I personally had never a problem with this, but I can't speak for you.
    Timo

  • Best Practice for module components based on API's

    Hi all,
    is there a white paper/other documents which outline best
    practice for using table/module component api's and best
    approaches to get around restrictions?
    I would also appreciate war stories about using this method of
    Forms development bearing in mind i would be using this as the
    foundation of a web deployed based application (intranet first -
    ultimately internet).
    Thanks
    Mark
    null

    You cannot add agents to skills dynamically; however, you can queue the caller into more than one CSQ based on statistics. You would use the Get Reporting Statistics and an If step within the Queued branch of your first Select Resource step. If the condition is met (e.g. Contacts Waiting >= 10) then exectue a second Select Resource step within the queued branch of the first. The contact would then be waiting in both CSQs waiting for an agent.

  • What is the best practice to deploy the SharePoint site from test to production environment?

    We are beginning to start a new SharePoint 2010 and 2013 development projects, soon developing new features, lists, workflows, customizations to the SharePoint site, customization to list forms and would like to put good practice (that will help in deployment)
    in place before going ahead with development.
    What is the best way to go about deploying my site from Development to Production?
    I am using Visual Studio 2012 and also have Designer 2013...
    I have already read that this can be done through powershell, also through visual studio and also via designer. But at this point I am confused as to which are best practices specifically for lists, configurations; workflows; site customizations; Visual studio
    development features; customization to list forms etc. You can also provide me reference to links/ebook covering this topic.
    Thanks in advance for any help.

    Hi Nachiket,
    You can follow below approach where the environments has been built in similar fashion
    http://thesharepointfarm.com/sharepoint-test-environments/
    if you have less data then you can use  http://spdeploymentwizard.codeplex.com/
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/b0bdb2ec-4005-441a-a233-7194e4fef7f7/best-way-to-replicate-production-sitecolletion-to-test-environment?forum=sharepointadminprevious
    For custom solutions like workflows etc you can always build the WSP packages and deploy across the environments using powershell scripts.
    Hope this helps.
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful
    Hi, can you answer me specifically with regards to the foll:-
    lists
    configurations
    workflows
    site customizations like changes to css/masterpage
    Visual studio webparts
    customization to list forms
    Thanks.

  • What are the best practice in report design ?

    Hi,
    According to you, what are the best practices in report desing about layout, fonts and colors ?
    Thks

    Hi,
    It all depends that what type of report you are designing and what tool you are using - WebI or Crystal.
    And in WebI, if it is cross tab or Tabular report etc.
    One most important thing is that what is client requirement. May be client does not like which is best practice.
    On the base of my personal experience I will create few demo reports using different options - layout, colors and fonts and show them to client so that they may decide.
    Regards,
    Bashir Awan

  • Best Practice SQL Alias with Named Instance

    Hi
    We have a SQL server, "MySQLServerName" with a named instance, "MySQLInstance", running on port "12345".
    I've created an SQL alias of "MySQLAlias" pointing to "MySQLServerName" Port on "12345" and it works.
    But should I have used "MySQLServerName\MySQLInstance" Port "12345"?
    Which is best practice?
    Thanks
    TJ

    As SQL Server named instance supports both static and dynamic ports, i think you can use the port number specified by you. By default, a named instance of SQL Server listens on a dynamic port. For a named instance of SQL Server, the SQL Server Browser service
    for SQL Server 2008, SQL Server 2005, or the SQL Server Resolution Protocol (SSRP) for SQL Server 2000 is always used to translate the instance name to a port, regardless of whether the port is static or dynamic. The Browser service or SSRP is never used for
    a default instance of SQL Server.
    Refer http://support.microsoft.com/kb/823938
    Regards, RSingh

  • Which one is the best practice!!

    hi all,
    i have one doubt with the lov
    can we show the data in the LOV by decode function or its better to write two LOV's based on the condition.
    which one is the best practice.
    right now i am using decode function. according to the condition the data will come in the LOV.
    Thanks..

    can we show the data in the LOV by decode functionAs you already do, you can.
    its better to write two LOV's based on the condition.It depends. If its a complex lov and only one column varies based onsome condition, it might less work to use just one lov. Personally, i prefer two different lov's

  • Best practice for installing which software group

    I am new to Solaris. I have Sun X2100 with 2 x 80G harddisks (run as email server, run tomcat, jboss and postgresql) , which software group is recommended for production install? Is there any guide (best practice)?

    There is one best practice document available from Oracle RACSIG site and "Oracle Real Applicaiton Cluster Administration and Deployment Guide" available on OTN is also good source of informaiton about 10g RAC.
    Oracle has made sincere efforts in 10g documentations expecially in server technology.
    Thanks & Regards

  • Which wayis the best practice ?

    Hi ,
    I am doubt of which way is the best practice to initialize instance component in a Panel.
    ie .is there any diference, in terms of performance , between initializing component inside the constructor or just outside of constructor?
    1)
    public class MyPanel extends JPanel
    private static JScrollPane scrollPane = new JScrollPane();
    public CustomerTaskPane()
    2)
    public class MyPanel extends JPanel
    private static JScrollPane scrollPane = null;
    public CustomerTaskPane()
    scrollPane = new JScrollPane()
    }

    Correction for the above reply.
    *btw can i avoid from declaring the static field of a class itself when i need to implement the class which follows Singleton pattern like.
    public class CustomerMainPanel extends JPanel
    public static CustomerMainPanel customerMainPanel = null;
    public static synchronized CustomerMainPanel getInstance()
    if( customerMainPanel == null )
    customerMainPanel = new CustomerMainPanel();
    return customerMainPanel;
    }

  • Best practice - which server OS should I use for Exchange 2010 install

    We currently have 2 exchange 2007 boxes running Server 2003. the plan is to upgrade to exchange 2010 (I'd prefer 2013 but the powers that be want 2010), and I have been asked to follow Microsoft best practice. The problem is I can't find anything to point
    me in the direction of the recommended server OS, I can find ones it will work on but nothing to say Microsoft recommend this...
    We have licenses for Server 2008, 2008 R2 and 2012 available, which one should I advise is the Microsoft recommendation?

    Thanks Andy,
    So is there no actual best practice recommendation for a server OS to run Exchange 2010 on? I agree that 2012 would be the one to go for, but the people making the decision on how we do this want reasons, and as they don't really have a lot of technical
    understanding I need to be able to go to them with "Use Server 20xx because it's Microsoft best practice".
    If there isn't a best practice recommendation I will try the longer support life and more options for high availability with 2012.
    Well, you probably wont find a "best practice" as much as a "its supported" stance from Micorosoft.
    As in all these things, there may be other reasons a business chooses to use 2008 over 2012 etc...
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • Which are the best practices with mail for machos and any email client for PC

    I got some mac`s at the office, and I want make a best practices manual for my users, like, please open the clip to attach the file intead of drag and drop, beacuse the pc users see the photo embedded into the message body.
    could someone helpme?

    Why not print out Mail's Help files?

  • Best practice for infoview and which folder to save webi or crystal reports

    All,
    I was wondering what are your thought about the following question.Imagine you have a customer using at the same time webi reports and also crystal reports against BW.
    The thing is that he is transporting the crystal report thru SAP using the rsadmin transaction to manage his crystal reports, but also use the SAP transport to move them to PROD .As far as webi, he is using the import wizard to move them to PROD. \
    As you know the crystal reports will end up into an SAP folder .. something that is such as SAP/(description of the menu role).
    Well webi reports happen to be inside the public folder.
    The question was .. what would be the best practice
    1 u2013 store all your crystal reports against BW in the SAP menu roles as it is ending up thru the SAP transport and have the webi reports inside the public folder ?
    2 u2013 Copy your webi reports from the public folder to the SAP /Menu role folder where my crystal reports are ?
    3 u2013 copy your crystal reports from the SAP/(menu role folder) to the Public folder ?
    Let me know what is your feeling as best practice
    Thank you
    Philippe

    Just a hint:
    The path SAP/2.0 is not mandatory. You can configure the SAP BW publisher on the BW side (transaction /CRYSTAL/RPTADMIN) so that your reports will be stored in another folder on the BOE side. Please note that the addition of the role name in the path cannot be overrided.
    Regards,
    Stratos

  • Best practice to configure a web server which hosting more than 1000+ Websites.

    We are deploying a new server for our shared clients. We have a new branded server with good config. Server is hosting IIS,MySQL,Mailserver is this ok. Or should i keep mailserver on different server. Also should i change the installation path of iis and
    other application or installing apps on C drive & keeping all websites and databases on D drive is good for server.
    Akshay Pate

    "Server is hosting IIS,MySQL,Mailserver is this ok."
    Impossible to tell.  You have not given us any indication of the configuration of the server nor the expected workload.  Yes, you say 1000+ web sites, but if each web site is looked at once a day, that's a lot different than if each web site
    is access 10,000 times a day.  So we can't tell if it makes sense to install different roles on different physical servers, though that is often considered a best practice.  Similarly, it is generally a good idea to install applications/data to drives
    other than the C: drive, but without a lot more information (too much for a technical forum), it is pretty difficult to say anything specific.
    If you do not feel comfortable making the decisions yourself, you would be better served by hiring a consultant to evaluate your proposed configuration and perform some benchmarking based on you expected workloads and traffic patterns.
    . : | : . : | : . tim

Maybe you are looking for

  • Difference in Profit center for GR/IR account in MIGO & MIRO Transaction

    1) We have created material 106267 with material type ROH. We have assigned profit center 1001052999 (common profit center) to material. 2) We have created WBS element MUM-RIV002.SS.RC.RF with profit center 1001052002. 3) We have created PO 400000023

  • Error while viewing an application

    Hello, After my application is deployed I try to run the application I get this message. Does anyone know what this error message is............ The initial exception that caused the request to fail, was:    com.sap.tc.webdynpro.services.exceptions.W

  • Trigger Save As... dialog with Javascript?

    I have a script that makes some significant changes to an Illustrator file and would like to have a "Save As..." dialog pop up at the end of the script to give the user a chance to save the changes in a location of their choosing. I know how to trigg

  • VAT number in Billing Header

    Hi, VAT number field is not getting determined in one speific case in the billing doc. In the configuration it is set as to get it form payer(SD>BF>TAX>Sales tax identification number> "B" (Payer). I have checked the payer master record it is maintai

  • My inbox/ view/ zoom in or out settings greyed out. Can't enlarge text! Thunderbird ver 31.4.0

    The problem is simply, that the zoom setting is there, but greyed out and doesn't work for the inbox text. Once I open an e-mail, the zoom works fine. I'm using a large screen HD TV connected to the PC via HDMI with 1920X1080p resolution, which makes