New functionality of Java modules was introduced as part of Java 9. Java Modules contain packages which are by default private. But why it is so?
It is introduced to improve maintainability of code as well as restricted accessibility.
So every module, has an module_info descriptor file apart from the packages.
module_info file has the configuration whether those included packages can be exposed and be made public so that other modules can access it.
Exporting Modules:
Every package is private inside a module but module_info file can make it public using export statement as below.
module my.module {
export package.name;
}
We can restrict which modules have access to our APIs using the exports…to directive.
Similar to the exports directive, we declare a package as exported. But, we also list which modules we are allowing to import this package as a requires. Let’s see what this looks like:
module my.module { export com.my.package.name to com.specific.package; }
Module Requires:
A different module which wants to have access to above module package uses requires keyword as below.
module my.module {
requires module.name;
}
Module Uses:
Now consider, If there is an interface and it’s implementation under same module.
So in the module info file for that module, it would be declared as this.
module my.first.module { provides MyInterface with MyInterfaceImpl; }
The same can be used in another module using uses keyword in the modue_info of the dependent module.
module my.second.module { uses MyInterface; }
If you see in the module info above, we have interface name instead of implementation which should be more than enough.
Garbage collector in java is a process which collects the objects having no reference in the JVM. Those objects are collected and the associated memory in the JVM is released.
The release of the memory is needed from time to time or else there are huge chances of an out of memory error happening when there are processes running.
Once the objects have no use(reference), they should be removed and that is what the garbage collector is for.
garbage collector in java clears which type of memory?
Since the objects are part of the heap space and heap space is part of the JVM (Physical memory), that memory is cleared.
The below image shows the java memory model.
Image Source : Jenkov.
The objects in heap are divided into 3 space segments.
1)Eden Space
2)Survival Space
3)Old generation
Old generation are the primary candidates for garbage collections.
Objects are moved from eden to survival and finally to old generation as part of the garbage collection process.
Source: Oracle Blogs
How to make an object be available for garbage collection?
Assign that object reference to an null value.
For example:
Apple A = new Apple();
A = null;
new Apple() instance which was created would be garbage collected now as there are no references to it.
There are 4 types of Java Garbage Collectors:
1. The Serial Collector
The serial collector is the simplest of all garbage collectors but it is preferred only in single threaded environments which are generally low intensity applications and not heavily loaded applications. When it is activated, everything is freezed and garbage collection is done. Hence it is not preferred in multi threaded critical applications.
You can activate it by turning on the -XX:+UseSerialGC JVM argument,
2. The Parallel / Throughput collector
This is the JVM’s default collector. It uses multiple threads to scan and release the memory in the heap. The downside to the parallel collector is that it will stop application threads when performing either a minor or full GC collection.
3. The CMS Collector
Following up on the parallel collector is the CMS collector (“concurrent-mark-sweep”). This algorithm uses multiple threads (“concurrent”) to scan through the heap (“mark”) for unused objects that can be recycled (“sweep”). This algorithm will enter “stop the world” (STW) mode in two cases: when initializing the initial marking of roots (objects in the old generation that are reachable from thread entry points or static variables) and when the application has changed the state of the heap while the algorithm was running concurrently, forcing it to go back and do some final touches to make sure it has the right objects marked.
The biggest concern when using this collector is encountering promotion failures which are instances where a race condition occurs between collecting the young and old generations. If the collector needs to promote young objects to the old generation, but hasn’t had enough time to make space clear it, it will have to do so first which will result in a full STW collection – the very thing this CMS collector was meant to prevent. To make sure this doesn’t happen you would either increase the size of the old generation (or the entire heap for that matter) or allocate more background threads to the collector for him to compete with the rate of object allocation.
Another downside to this algorithm in comparison to the parallel collector is that it uses more CPU in order to provide the application with higher levels of continuous throughput, by using multiple threads to perform scanning and collection. For most long-running server applications which are adverse to application freezes, that’s usually a good trade off to make. Even so, this algorithm is not on by default. You have to specify XX:+USeParNewGC to actually enable it. If you’re willing to allocate more CPU resources to avoid application pauses this is the collector you’ll probably want to use, assuming that your heap is less than 4Gb in size. However, if it’s greater than 4GB, you’ll probably want to use the last algorithm – the G1 Collector.
4. The G1 Collector
The Garbage first collector introduced in JDK 7 was designed to better support heaps larger than 4GB. The G1 collector utilizes multiple background threads to scan through the heap that it divides into regions, spanning from 1MB to 32MB (depending on the size of your heap). G1 collector is geared towards scanning those regions that contain the most garbage objects first, giving it its name (Garbage first). This collector is turned on using the –XX:+UseG1GC flag.
The G1 also has an advantage that is that it compacts the heap on-the-go, something the CMS collector only does during full STW collections.
WhatsApp has gone live with its payments offering in India with four banks which are State Bank of India, ICICI Bank, HDFC Bank & Axis Bank.
Whatsapp would now offer UPI based payments facility to it’s users after clearance by the National Payments Corporation of India in November 2020.
Many whatsapp users initially felt that payment feature was already provided by Whatsapp. But actually that was a beta version and the feature was available only to a million users.
“UPI is a transformative service and we jointly have the opportunity to bring the benefits of our digital economy and financial inclusion to a large number of users who have not had full access to them before,” WhatsApp India head Abhijit Bose said.
As of now, the limit is 20 million users which would increase with time.
Clearly it seems whatsapp wants to be the super app or kind of weChat in the future for India. Eventually they would foray into other financial services to take forward their growth story.
Whatsapp currently has 400 million users in India so there is a huge scope for the growth of this mobile messaging app.
NWC has Launched AI based crypto app 2 weeks back november end•
Biggest educational block chain company. •
Audited project. 120K Users.
A crypto APP that will be backed by their native token. You will be able to enjoy an unparalleled market overview, personalized UX, and a crypto game called Doodle Pump!
Project has strong fundamentals and i can’t wait to see its performance in the bull run.
The app is also offering to buy crypto with the app. It has also good tokenomics and has a good community. It should have a bull run with the launch of the first application.
Future should be good but too early to predict anything.
NewsCrypto is a stable, self-funded project, with a working product, which is one of the best investment assets in the blockchain sphere.
The heart of the NewsCrypto platform is the NWC token
a Stellar Lumen compliant token that underpins all transactions for the NewsCrypto network.
The economy of the NewsCrypto platform has made the NWC token a multifunctional means of payment, remuneration, and accumulation.
The token provides access to the system’s payouts, bonuses, and it provides an opportunity to quickly develop an internal ecosystem.
It is currently at a support level as of 16 Dec 2020 but a bullish run to at least a 1$ is very much possible in 2021 with the launch of the crypto app.
IPO means initial public offering of shares through which company raises money.
This is the 15th IPO in 2020 after SBI Card, Mindspace Business Parks REIT, Route Mobile, Happiest Minds Technologies,Rossari Biotech, Chemcon Speciality Chemicals, Angel Broking, Mazagon Dock Shipbuilders, UTI AMC, Likhitha Infrastructure, Computer Age Management Services, Equitas Small Finance Bank, Gland Pharma and Burger King India.
The company plans to raise Rs 540.54 crore through this IPO.
The IPO consists of a fresh issue of Rs 40.54 crore and an offer for sale of Rs 500 crore by selling shareholders. So the amount of 40 cr would only be used for business by the company and rest would be given to the selling share holders.
The funds would be used to expand the company’s Rajpura manufacturing facility.
Company has most of the presence in North India and is mainly in the biscuit and bakery segment. It manufactures and markets a range of biscuits such as cookies, creams, crackers, digestives and glucose – under flagship brand ‘Mrs Bector’s Cremica’.
The company also manufactures bakery products in savoury and sweet categories which include breads, buns, pizza base and cakes under brand ‘English Oven’.
The company supplies bakery products to around 26 states all over India and to 64 countries abroad which means growth potential is good for the company.
The strengths of the company is that it is an major exporter of biscuits, good management and good distribution network. From time to time, it offers good dividends to it’s share holders. They have a good relationship with the vendors.
The competition is huge in this sector with the likes of Brittania, ITC and Parle.
So it would be interesting to see how Mrs Bector copes with it. There is huge scope for the company to grow and let’s how it implements it.
Financials:
In the financial year FY18 to FY20, company registered a revenue growth at a CAGR of 5 percent, but profit declined at a CAGR of 8 percent in same period. However, its financial performance started improving in FY21 with profit at Rs 39 crore on revenue of Rs 431 crore in first half of FY21.
So the financials looks OK but not very good.
Market Share:
Important dates:
15th-17th december – IPO opens
22nd – allotment date
Listing – 28th december
Analyse and take the decision which you think is correct.
52.98% BPCL stake government wants to sell. Rest of the stake is with DII and FII and general pubic.
Bidder has to buy whole 52.98% and also the stake of DII and general public shares as per the announcement.
Reliance Industries, Saudi Aramco and Vedanta’s Anil Agarwal wants a stake as per the reports. Vedanta seems to be the front runner but time will tell.
But it seems Mota Bhai wants to concentrate more on Jio and Retail. His health concerns are also said to be one of the reasons due to which reliance is not rumored.
Disinvestment will move to stage 2 after scrutiny with Deloitte. After clearance from auditors, bids would be taken. BPCL event could be a turning point in India’s disinvestment program.
LPG subsidy for BPCL consumers will continue post privatization as per latest reports.
It owns 17K petrol pumps so the stakes are huge.
Let’s see what happens. Rally in the share price is a possibility later but there have been some fall recently post annoucement.
A smallcase is a basket of exchange traded securities like stocks in a specified weightage to reflect a certain theme. A smallcase has a minimum of 2 securities and a maximum of 50 securities. Minimum amount investment needed of around 20k. Small case can be of type High risk and Low risk. So you need to select the one best for you. Similar to thematic mutual funds based on themes.
For example, Smart Cities & Affordable Housing are some themes which you would find in smallcase. These themes contains a portfolio of stocks related to the theme.
For example, if you choose for affordable houing theme then some sample stocks part of the small case portfolio would be asian paints,crompton,orient electric,housing dev corp etc.
Broker would review the stocks in the small case basket and add remove stock according to performance. Small cases are designed by experts according to the current market scenarios.
Why to use small case? There has to be a benefit or else the concept would not have been invented. So with smallcase, hectic task of selecting individual stocks and adding to our portfolio is avoided. One click and basket of stock’s added. How simple is it? 🙂
How it is diff from Mutual funds: Unlike mutual funds, with smallcases you get: Cost Cutting – No extra fees Transparency in your portfolio and ownership – See what’s inside the portfolio
Fees: You are charged a one-time flat fee of ? 100 when you invest in a smallcase (no additional fees for further orders in the same smallcase). As an introductory offer, this Rs. 100 fee is waived off for the first 1,000 smallcase investments. Brokerage & other statutory fees are applicable as usual for all orders placed.
Which small cases should we invest in?
Small Cases work best when you want to invest for a long term. So choose a theme which you feel would work in the long run. You can go to small case website and check out the best themes suitable to you.
Biggest Positive:
The biggest positive is that we are easily investing into multiple stocks with a single click. It is good product but new investors can avoid it. Evolved investors should invest in it as they are accustomed to themes and known to thematic mutual funds and have good experience in markets. Not for new investors is which i feel but you can do your analysis and take the call.
Additional benefits:
1)With smallcases, you have complete flexiblity over your investments, so you can add or remove stocks anytime. However, please ensure that you don’t sell any smallcase stocks directly on the trading platform. 2)No lock In periods.
Below is the list of stock brokers providing the facility of small case.
For exploring different kinds of small cases, kindly visit www.smallcase.com